Reputation: 63
This is what I have:
nav .class1, nav .class2, nav .class3 {property: value;}
This is what I want (or something similar):
nav (something) .class1, .class2, .class3 {property: value;}
Upvotes: 0
Views: 56
Reputation: 10127
If you could change your html, you could add a class to the elements you want to match, like this:
HTML:
<nav>
<div class="class1 to-match"></div>
<div class="class2 to-match"></div>
<div class="other"></div>
</nav>
CSS:
nav > .to-match {property: value;}
If you can't change the HTML the only way to do this is with a preprocessor.
Upvotes: 1