lxsmnsyc / solid-styled

Reactive stylesheets for SolidJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resepect postcss plugins?

asaf opened this issue · comments

Hey,

I have a Vite based project with postcss.config.cjs that have some plugins,
Since this package is postcss based, would it be possible to respect the postcss plugins as well?

Thanks.

It's actually no longer postcss-based, see: https://github.com/lxsmnsyc/solid-styled?tab=readme-ov-file#css-processing

But, if it was still in postcss, there's no room for plugins to be supported because that requires async processing, which is not possible because Babel can only run synchronously. A lot of people who tried this had implemented a solution that isn't universal (the solution being running the async task on a separate process and making it so that it runs sync on the main process), so I never really reconsidered it.

Fair enough, I personally needed the custom media queries and nesting which seems to be supported in LightningCSS,

I get: [plugin:solid-styled] custom media query --foo is not defined, I tried ti define them in my root component's using @global but it doesn't wok (maybe related to #18)

Thanks for the great work, I like the style of this plugin!

Yeah I'll give this a maintenance run again. The thing is, I'm not sure if LightningCSS has already fixed the said issue.

I'm closing this in favor of #18