3 ms·
> I already explained this? You set it at the top level Not quite: 'color', 'background-color' and 'border-color' are 3 separate properties that can't be be in
by sangnoir 11y ago
> I already explained this? You set it at the top level
Not quite: 'color', 'background-color' and 'border-color' are 3 separate properties that can't be be inherited from one place using vanilla CSS
- BinaryIdiot 11y agoThose are three different ways of coloring something (and very rarely are exactly the same in my experience). Using variables to make those three the same color is an abuse of DRY in my opinion.
- sangnoir 11y ago> Using variables to make those three the same color is an abuse of DRY in my opinion. I disagree - as a matter of fact, a lot of CSS frameworks have the concept of a "primary color" that is used in the manner I have described. Additionally,following your idea of DRY would render CSS variables pointless in CSS preprocessors as mixins cover that use-case (setting the same property).