stitchesjs / stitches

[Not Actively Maintained] CSS-in-JS with near-zero runtime, SSR, multi-variant support, and a best-in-class developer experience.
https://stitches.dev
MIT License
7.76k stars 253 forks source link

How to add `!important` automatically #1157

Open MICAHFANG opened 1 year ago

MICAHFANG commented 1 year ago

Hi, 👋

I'm using @stitches/react in my project, in some cases I need to use cleanslate(a hightest order css reset tool). But this tool needs to add !important to overwrite it's own style.

Rightnow, I can only add !important to every properties' end manually.

Is there any way to add !important after each line automatically?

like some other tools like postcss has plugins can do these things. But I cannot find any way in stitches.

MICAHFANG commented 1 year ago

Or, is there any way to use the methods like getCssText in SPA projects.

I found an example that is using postcss and nextjs #409