cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.07k stars 399 forks source link

[Question] Advantage over One Class One Property #536

Closed imerkle closed 7 years ago

imerkle commented 7 years ago

Whats the profit of this method compared to used in Fela and Styleron (single class per property.)?

kof commented 7 years ago

I guess you are talking about atomic rendering, where every css rule contains only one property, right?

The biggest problem with this approach is convenience. If you tried styletron, you will see that if you change in dev tools one value, it will break everything on that page. Also this is a good list http://fela.js.org/docs/introduction/Drawbacks.html

I was thinking to add atomic rendering as a plugin or evtl as a renderer. I didn't see enough benefit though so far to do this myself. You are free to try though.