4 ms·
> > descendant combinator should have been » and indirect sibling combinator should have been ++, so there's some logical relationships among the selectors' asc
by Izkata 6y ago
> > descendant combinator should have been » and indirect sibling combinator should have been ++, so there's some logical relationships among the selectors' ascii art
> wat
Skipping the combined character mistake, it means it should have been: > for direct descendant, >> for indirect descendants (instead of just a space), + for direct siblings, ++ for indirect siblings (instead of ~).
- the_other 6y agoIndirect descendant uses just whitespace because it’s the most common and most useful relation. Making it two characters would have annoyed everyone using the language every time they used it.
- chrismorgan 6y agoIt would have nudged people in the direction of using direct descendants much more of the time, which is a Good Thing, as they are far easier to optimise, and are much less likely to match things by accident.
- the_other 6y agoThat would have made applying broad strokes design choices much harder, and is generally less useful. CSS is general-first, specific second. Making people use direct descendants more often would make stylesheets more verbose and complicated. It would have stymied the power and expressivity of the language.
- deleted 6y ago[deleted]
- inopinatus 6y agoOh, but it makes so much sense as ». It's an expensive operator, it should be harder to type.