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

Question on CSS sibling selectors is partially wrong #150

@jkemming

Description

@jkemming

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions