2 ms·
> I didn't know there was a name for this method I just made that one up when I started formalizing the method! > The only bullet you have to bite is occasion
by ehnto 7y ago
> I didn't know there was a name for this method
I just made that one up when I started formalizing the method!
> The only bullet you have to bite is occasionally repeating yourself, but as you say, that part of CSS never really worked well anyway.
I find as well that if you write clean, concise CSS that doesn't have to override anything you get away with far less CSS anyway. So repeating yourself isn't so bad. Similarly, in a project of any longevity, especially if clients are involved, chances are pretty high the things you repeated will eventually diverge. So had you made it DRY you would have to de-compose the coupled components and write it again anyway. With the Contexts, you can make most diverging modifications without ever touching the components, and I feel any more levels of inheritance than that leads to CSS that is more complex than it needs to be.