2 ms·
> Probably better compression by not repeating styles everywhere Repeating styles would be the least of the problem because of the gzip compression, no?
by njsubedi 6y ago
> Probably better compression by not repeating styles everywhere
Repeating styles would be the least of the problem because of the gzip compression, no?
- onion2k 6y agoI suspect that if you're using React's 'style' expansion using an object, the order of styles that are written inline is going to be non-deterministic which means your compression won't be optimal. It'll still work, obviously, but not as well as the compression you'd get if you used a class name.
- tbassetto 6y agoCorrect. I like the "Controlling File Size" of the Tailwind CSS project: https://tailwindcss.com/docs/controlling-file-size https://tailwindcss.com/docs/controlling-file-size They DO tell developers to remove unused CSS when building for production of course, but in case you ship the whole (big) default file, it goes from 2309.7K to 180.6K (Gzip) or even 43.6K (Brotli)!