|
|
|
|
|
by axyz
2227 days ago
|
|
we use this approach since more than a year with very good results. Regarding the data transfer it is not much of a problem because those classes usually get repeated a lot across the elements and having lot of repeated string is the best case scenario for gzip compression leading to basically no size impact. https://github.com/utilitycss/atomic
This is the framework we developed to create atomic CSS component libraries if you want to have a look (documentation needs some love, but is quite stable) |
|
gzip helps for sure, but I doubt `<class="card">...` ends up larger than `<class="a b c d e"><class="sub-a sub-b q etc"><class="repeat per element">...`.