Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Question on CSS sibling selectors is partially wrong #150

Open
jkemming opened this issue Mar 19, 2019 · 1 comment
Open

Question on CSS sibling selectors is partially wrong #150

jkemming opened this issue Mar 19, 2019 · 1 comment

Comments

@jkemming
Copy link

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.

@skatcat31
Copy link
Contributor

@jkemming seems like a great and easy PR to me 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants