When I have a stylesheet where a declaration exists several times, I tend to think I can simplify and clean things up by applying it to multiple classes and Ids at a time. This seems best practice, but I wonder if it's really any faster.
example... which is faster, better, best practice? Imagine a scenario where it isn't just three items, but 20 or more. (note: To simplify, I wrote ''several other declarations" rather than a bunch of random declarations.)
This:
.item1 { width: 100%; /* several other declarations */ }
.item2 { width: 100% /* several other declarations */}
.item3 { width: 100% /* several other declarations */}
Or this, which I tend to do... but I'm not sure it's really any quicker... sometimes it even seems like it's More lines, though I'm trying to get rid of duplication:
.item1,
.item2,
.item3 { width: 100%; }
.item1 { /* several other declarations */ }
.item2 { /* several other declarations */ }
.item3 { /* several other declarations */ }