I know this might sound crazy but for a small CSS experiment I ended up having to match a lot of selectors and I don't know how many there might be.
I made a codepen (based on an article from a list apart)
https://codepen.io/KADlancer/pen/gvEppr
Even though I can make SASS build all combinations I need, I don't want to end up having to include all combinations in my prod css file like this.
.state-1:checked ~ .panels .panel-1,
.state-2:checked ~ .panels .panel-2,
.state-3:checked ~ .panels .panel-3 {
display: block;
}
Thats ok for 3 - 10 maybe but after that... it gets insane. I'd love to build something like this.
.state-[magicIndex]:checked ~ .panels .panel-[magicIndex] {
display: block;
}