Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Opinion: Can we improve the efficiency of comma separated multiple selector targeting Re: Opinion: Can we improve the efficiency of comma separated multiple selector targeting

#110439
Senff
Participant

@Paulie_D: Correct, of course! But I always see SASS as “something that will, eventually, be possible in CSS”. Maybe too hopeful or wishful thinking, but still!

For the record, the SASS syntax would be:

.someclass {
h2, p, .subclass {
margin:10px;
}
}

And after compilation it would be:

.someclass h2, .someclass p, .someclass .subclass {
margin: 10px;
}

But, in a few years from now that first piece of code may be enough in standard CSS.