Hacker News new | ask | show | jobs
by wizzzzzy 1738 days ago
I got interested in atomic CSS a few years ago and used it on numerous projects for over a year. In the end I actually found the real world application of it a step backwards. What you gain in getting up and running quickly you loose in maintainability in my experience.
1 comments

We keep all of our components in template files so it's quite easy to maintain for us. If we need to change all of the buttons across the app, we just update the Button component.
I also was using component tempalte files although the issue was apparent when returning to any component with any degree of complexity. Regular CSS class names tend to give you a bit of an insight into the role of each div whereas atomic css requires you to parse each line to understand it's role which gets a bit tiring after a while. I tried extracting the strings of atomic class names to variables as a sort of hybrid approach but in the end it felt more or less like emulating 'normal' CSS. I'm sure different projects would fair better though with an atomic approach though.
IMO you can and should still add useful class/id names to explain what your elements are doing. Those just won't have any styling associated with them.