3 ms·
> how you optimally structure your CSS for composition and reuse. I have the most trouble with this with CSS. I'm ordinarily at keeping my programming logic we
by jrochkind1 5y ago
> how you optimally structure your CSS for composition and reuse.
I have the most trouble with this with CSS. I'm ordinarily at keeping my programming logic well-organized and maintainable, but with CSS I do bad and feel bad about it.
Appreciated the references for some things to read on this.
- oblak 5y agoI feel like your approach should depend on your particular project/needs. With modern frameworks, CSS/SCSS is often "scoped" to components which could lead to just a handful of general purpose or page specific CSS files that need no organizing as files go. Content of said files is another topic. Inheritance is built in and you can overwrite pretty much anything from everywhere. That's both good and bad. If you happen to reuse something, put in (one of your) main css file. Having your own set of lego block goes a long way.