DEV Community

Discussion on: SOS! CSS is eating my timeline!

Collapse
 
deciduously profile image
Ben Lovy • Edited

TailwindCSS. It provides a wide set of utility classes for you to use out of the box, and for most layouts you can probably stick to those. It's easy to create your own utility classes. I know you said that's not what you want, but I'd definitely recommend a closer look at this one. This framework isn't in the "idiot proof" genre, you still do all the heavy lifting, but you spend your time on design, not CSS gotchas. My $0.02, at least. I generally dislike CSS, and am hoping I get to use Tailwind for a long time to come.

Collapse
 
uminer profile image
Moshe Uminer

Also, if size is an issue (the default tailwind bundle is some 700kb!) you can use purgecss to remove any unused styles (as explained in the tailwind docs). Using purgecss will usually bring down the bundle size to a fraction.

Collapse
 
deciduously profile image
Ben Lovy

Definitely - I use cssnano as well as purgeCSS, both via PostCSS. My production bundles with Tailwind are not remotely problematic size-wise.

Collapse
 
readredready profile image
Charles Gibson

Thanks for the recommendation. I think I can live with this. I was already writing custom utility classes and the stylesheet to go with it. If I rewrite my classes for TWCSS it should translate easily. The CSS gotchas and handwritten stylesheet were holding me back a lot.

I originally went this route because I saw potential in utility CSS: it pairs well with components, scales well virtually and IRL, reduces working docs, all without bloat.

Collapse
 
ben profile image
Ben Halpern

We're taking DEV in a Tailwind-esc direction. Seems like everyone in this thread feels that way πŸ˜„

Thread Thread
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

I'm curious: How do you keep your CSS maintainable with Tailwind in large-scale apps and websites? I can see it being useful for iterating very rapidly on small projects, but a sea of classes in HTML is going to be very difficult to look at, let alone debug, isn't it?