Question on CSS sibling selectors is partially wrong
jkemming opened this issue · 1 comments
jkemming commented
The question css-sibling-selectors
seems to give a partially wrong answer.
As per W3C spec, the ~
(tilde) combinator does not work the way it's described in the answer. Instead, it's almost the same as the +
combinator except that the element following the combinator doesn't have to be placed immediately after the one before the combinator.
On a side note, the W3C seems intent on changing the combinator names, in fact this appears to have happened already in the currently active level 3 spec. The general sibling combinator
(~
) was renamed to subsequent-sibling combinator
and the adjacent-sibling combinator
(+
) changed to next-sibling combinator
. One might consider using these names as well.