Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's pretty much how i felt about this post. A design system is independent of it's implementation, the swatchlike presetting Tailwind provides (and is often confusingly referred to as the "design system") is achievable with css variables or preprocessors just the same.

don't get me wrong utility classes have a place in CSS - but they should be introduced as needed.

Writing all your styles with utility classes makes it easy to just sprinkle in changes and flavours directly in your components, but come at the cost of having a mess of class strings everywhere that make it very hard to further maintain the project when it gets more complex.

css-in-js bring about the same pitfalls, all your styles are sprinkled in your templates and get modified and overwritten in places where components are called instead of providing a top down view of how things should look. Responsiveness makes it an even bigger mess and hard to control global aspects of the design.

I strongly believe that decoupled, BEM-type styling systems with a solid variable based configuration, and a well thought out and DRY cascade together with utility classes for specific recurring needs are still superior to just dumping the styles inside each and every component as you go along.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: