Hacker News new | ask | show | jobs
by mcntsh 1738 days ago
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.
1 comments

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.