astroturfcss / astroturf

Better Styling through Compiling: CSS-in-JS for those that want it all.
https://astroturfcss.github.io/astroturf/
MIT License
2.28k stars 60 forks source link

Empty css rules with /*!*/ #726

Open ludmiloff opened 2 years ago

ludmiloff commented 2 years ago

Tried astroturf beta.22 both with web pack and rollup. Although it works quite good I noticed a strange empty css rules when using css tag:

const ColumCss = css`
    flex: 1;
`

produces something like this:

._3Zk5u9YHXm0-_mPxff16Kr{ /*!*/}._2O-9JWMh9qrl552If5hMvY{flex:1}

The same declaration with stylesheet tag is fine (no empty rules)

How can I avoid this?

jquense commented 2 years ago

the empty rules are intentional. It's pretty hard to explain in a few words but this is necessary to correctly implement composes