4 ms·
Utility-First CSS only makes it easier to use inline styles (by reducing verbosity) and provides a standard set of classes so you don't end up creatin
by al2o3cr 7y ago
Utility-First CSS only makes it easier to use inline styles
(by reducing verbosity) and provides a standard set of
classes so you don't end up creating 100 variants of margins.
If your "standard set" has 3 varieties each for top/bottom/left/right margin, you've already got 81 combinations of margins available at each element.
- dceddia 7y agoI was just today watching some of the videos Adam Wathan put together for Tailwind [0] and this one on "Optimizing for Production"[1] is especially relevant to your comment. You can introduce a build step (in his example, PurgeCSS) to filter down to only the styles that you actually use. So during development you'd have thousands of available classes, but in practice you only use a handful, and that final CSS file can be significantly reduced. I'm not (yet?) fully on board the utility-first bandwagon and I have yet to give it a solid try, but I was excited by the idea that it should be pretty optimizable. [0] https://tailwindcss.com/course/ https://tailwindcss.com/course/ [1] https://tailwindcss.com/course/optimizing-for-production https://tailwindcss.com/course/optimizing-for-production