Is there a more efficient way to write the following CSS in LESS format, or is this it?
li:first-child {
border-right: solid 0.188em #da291c;
padding: 0 2em 0 0;
}
li:first-child + li {
padding: 0 0 0 2em;
}
li:first-child + li + li {
padding: 0 2em 0 0;
border-right: solid 0.188em #da291c;
margin-left: 21%;
}
li:first-child + li + li + li {
padding: 0 0 0 2em;
}
&
stuff. What you have is as short as Less (with selector grouping done) and is more readable than using the&
stuff. I'd also recommend usingnth-child
if you aren't looking to support IE8.