DEV Community

Discussion on: ember-csz: A CSS-in-JS solution for styling in Ember

Collapse
scottamesmessinger profile image
Scott Ames-Messinger

This looks really fascinating! What are the performance implications of this approach? Are there cases where this would be a poor choice and other areas where it would be a good fit?

Collapse
rajasegar profile image
Rajasegar Chandran Author

For a framework like Ember, there were no ways of splitting and lazy loading css other than using Engines, but with csz you can load css dynamically at runtime. And at the same time you should not load large css files with csz also, I was trying to load the entire tailwind.css and my browser hangs or crashes most of the time. But this will be a good thing if you want to have your styles for the current page or component loaded dynamically. Yet to work on the scalability and performance aspects of using csz...