3 ms·
> CSS codebases have the tendency to grow organically and eventually start collapsing under their own weight,... This was true if you don't co-locate CSS and c
by l5870uoo9y 3y ago
> CSS codebases have the tendency to grow organically and eventually start collapsing under their own weight,...
This was true if you don't co-locate CSS and code that uses it. Remove the code that imports the modular CSS and you remove the CSS. Interesting project nonetheless (even written in Clojure).
- xp84 3y agoNot wrong, but the main “collapsing” problem I’ve observed isn’t dormant CSS code that isn’t used, but code which, whether legitimately used or not, is not scoped to the component it supposedly belongs to (and may sit alongside in the source tree), interacting with or cascading to other elements unexpectedly. It seems like something you’d just solve by convention, wrap as SCSS around whole files, and just demand of your front end developers. But still I’ve never seen it done thoroughly. Too many broad rules slip in there. I guess it’s why styled components are popular, as inelegant a solution as it is :(