|
|
|
|
|
by kowdermeister
3481 days ago
|
|
> the component is easier to manage But you can still keep CSS in a CSS file inside a module folder. SASS or any other CSS build took could grab it from there. > get around the global nature of CSS That can be done with proper scoping supported naturally by CSS. Local CSS is still not as bad as moving CSS declarations to JavaScript. |
|
Gzip helps reduce the impact of this, but Styletron's gzipped CSS is still much (40% or so) smaller than the other CSS-in-JavaScript implementations [2]. In some cases, the cost of switching to using a tool like Styletron might be justified by faster loading times in low-bandwidth markets.
[1] http://cssstats.com
[2] https://ryantsao.com/blog/virtual-css-with-styletron