some description of css-in-js
Scoped styles
- automatically generate className
- no selectors clashing
- generating real css, not inline styles
- describe our styles as component(like styled components
Critical CSS
- providing only those styles required to render the current page
is now baked in, not opt-in?
Smarter optimisations
- function-like classes to keep bundle lean(Atomic css
|
|
- devide styles into different classes and combine them(styletron
|
|
Package management
- css dpepending
- make css as a library (polished
|
|
Non-browser styling
- not only for react-dom
Conclusion
We may not be using CSS-in-JS today, but it’s quite possible that a compelling reason to switch could arise sooner than we think