
How to Structure Your CSS Better as Components - jehna1
https://restishistory.net/blog/how-to-structure-your-css-better-as-components.html
======
PaulHoule
The other day I was looking at the output of nbconvert (turns Jupyter
notebooks to HTML) and found the default template embeds over 10,000 lines of
CSS!

I see the point of munging the names of CSS classes and I'm very interested in
the problem of cutting up N HTML documents to produce an N+1 HTML document,
which probably requires this.

However, I'm also increasingly concerned about the sheer size of web sites and
applications that people are building today and one factor there seems to be
more and more stuff that gets added to the stack.

------
maxharris
Neat! If you're looking for a more advanced library that's easier to use, try
[https://www.styled-components.com/](https://www.styled-components.com/)

~~~
jehna1
Yep, styled-components is another good take on the same idea as CSS Modules.

More alternatives include:

\- Aphrodite
([https://github.com/khan/aphrodite](https://github.com/khan/aphrodite))

\- Radium
([https://github.com/FormidableLabs/radium](https://github.com/FormidableLabs/radium))

\- JSS ([https://github.com/cssinjs/jss](https://github.com/cssinjs/jss))

~~~
jehna1
Here's also a pretty in-depth comparison on many other alternatives:

[https://github.com/MicheleBertoli/css-in-
js](https://github.com/MicheleBertoli/css-in-js)

