lxsmnsyc / solid-styled

Reactive stylesheets for SolidJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fresh install - help to setup

AverTry opened this issue · comments

The Error:
solid-styled.js Uncaught (in promise) Error: Unexpected use of css. Make sure that solid-styled's plugin is setup correctly.

Tested with fresh installs of,

vite 4.4.5 solidjs 1.7.8
vite 5.0.0 reverted to 4.4.5 solidjs 1.8.5 (Vite 5 not yet compatible with solidjs)


npm i solid-styled
npm i -D postcss

In app.jsx added before the App function return statement:
import { css } from 'solid-styled';

css`
    .read-the-docs {
      color: red;
    }
  `;

Then error in browser console as mentioned at the top.

Also tried <style jsx>{...} in the return statement, but the result is no different than without solid-styled installed. There is still no scoping all is global. There is no errors as I imported nothing, when using the style tag, should I be importing something, as your docs are unclear here?


Is this fixable? Thanks for any help you may give.

Got the plugin for vite working, but with issues, will open another issue if cannot resolve.