DEV Community

Discussion on: Why Tailwind CSS

Collapse
 
ryanhiebert profile image
Ryan Hiebert

How would you relate it to CUBE CSS?

Collapse
 
swyx profile image
swyx

no idea. you take a crack at it?

Collapse
 
ryanhiebert profile image
Ryan Hiebert

I really like what I've seen from the philosophy behind CUBE CSS piccalil.li/blog/cube-css/. From what I can gather (and I don't trust my assessment, so recognize that these are unpolished musings), it seems to me that tailwind, which would fit into the "U" of CUBE, should fall behind the compositional CSS that CUBE CSS recommends as a first step.

This makes sense to me. You've pointed out some really good reasons why CSS-in-JS and module systems have challenges. I'm inclined to think that there's still a proper place for using CSS cascade as it is designed, even while using utility classes.

Thread Thread
 
swyx profile image
swyx

i took a quick look. i'd say you're being too superficial if you shoehorn tailwind into "U". the ultimate philosophy tailwind espouses is way more extreme - devolve all components into their most atomic elements and never bother with creating any classes or exceptions or composition selectors. this suits a much more fluid development style. i agree there is still a proper place for the cascade but it is likely <5% of the styles you write rather than 50% (for illustrative purposes just talkign about order of magnitude)

Thread Thread
 
ryanhiebert profile image
Ryan Hiebert

Thanks, I appreciate your thoughts on it. I don't have enough experience writing CSS to give the kind of evaluation that you just did, so that's very helpful.