|
|
|
|
|
by BinaryIdiot
3734 days ago
|
|
No but ultimately specifying it in two places could be better. So first off if you want it to literally be the same then you could do something like: h1, button {
color: #343434;
}
That would make them the same. You could also do .primaryColor {
color: #343434;
}
Then set the elements which should have a primary color with that class.But if you could break my first example apart and set it in two places just as easily. But that's setting it at a high level element itself. You could even go crazier and set EVERYTHING to that color but ultimately many of these decisions have to be context based to decide. |
|
The way I see it, CSS preprocessors allow for code reuse via composition - vanilla CSS restricts you to inheritance.