Say I have this html :
<div class="div">
<div class="sub-div"></div>
<div class="sub-div"></div>
<div class="extra-sub-div"></div>
</div>
Currently if I want to get the second sub-div, I can do this :
.div .sub-div:nth-child(2) {
attribute: value;
(...)
}
Now, if I want the extra sub-div, I can do this :
.div .extra-sub-div {
attribute: value;
(...)
}
Now let's assume the attribute and value of the css is the same for all.
Something like :
width: 80px;
What is the css to write to gather all these div in one, instead of writing multiple css like this :
1.
.div .sub-div:nth-child(1) {
width: 80px;
}
.div .sub-div:nth-child(2) {
width: 80px;
}
.div .extra-sub-div {
width: 80px;
}
?