4 ms·
The decision to make CSS libraries that are reusable across all parts of your application is spot on. Also it helps with theming, eg dark mode. To avoid listing
by cousin_it 7y ago
The decision to make CSS libraries that are reusable across all parts of your application is spot on. Also it helps with theming, eg dark mode. To avoid listing tons of classes on each element, you can use something like less:
.my-class {
.utility-class-1;
.utility-class-2;
}
Reusable constants also help a lot.
- pixelbash 7y agoOn the dark mode thing, another way to do this is using css variables like --color-foreground for example. The whole site can have dynamic colour themes with minimal effort after that.