Elektrine lite

← Feed

@MerriNet@mastodon.social

2026-02-03 10:57 UTC

With CSS people sometimes suggest going for atomic, or essentially, utility classes. To minimize the size of CSS. At worst meaning each class is one declaration. However I think this is the wrong place to optimize. While throwing in lots of classes in HTML isn't that bad, it does get bad when your JavaScript also grows as the cost of 1 byte of JS is roughly 100 bytes of HTML/CSS. If optimizing CSS increases the size of HTML and/or JS, then that is not the optimization to do.

Replies (0)

No replies.