DEV Community

Discussion on: How to write better CSS in teams with ACSS — A dynamic Atomic CSS library

 
chinchang profile image
Kushagra Gour

From the article:

It’s hard to write all those same set of classes over and over.
Yes, it is. ACSS says it’s a component based framework. If you are not templating each of your components and are already duplicating HTML, say to create a button every time, ACSS isn’t for you.

For example you should be creating buttons using an abstracted button component like so:

<MyButton primary>Hello World</MyButton>

Hope this clears your doubt.

Thread Thread
 
moopet profile image
Ben Sinclair

It doesn't, really. If you're making a separate web component for every single thing on your site, like <actionbutton>, resetbutton, <edgecasebutton>, etc, then that seems like a never-ending task.

If you're just templating components, it doesn't make any difference to my argument - you still have to find which component does what and update the templates rather than updating the stylesheet. You have to change all your components rather than apply a theme. You can't switch between themes without re-building and deploying your site, and this all just feels like a massive step backwards.