Skip to content

[selectors] some inconsistent concepts and descriptions #386

Closed
@wargrey

Description

@wargrey

https://drafts.csswg.org/selectors/#syntax
https://drafts.csswg.org/selectors/#simple
https://drafts.csswg.org/selectors/#grammar

  • Are pseudo elements simple elements?

Pseudo-elements do not exist independently in the tree: they are always bound to another element on the page, called their originating element.
Syntactically, a pseudo-element immediately follows the compound selector representing its originating element. If this compound selector is omitted, it is assumed to be the universal selector *.

Only the grammar defines pseudo elements are simple elements, this is okay syntactically. Also, is it only one pseudo element that can be attached to the originating element? If it is not, do they share the same originating element(rather than, say, the 2nd one is the originating element of the 3rd one)?

  • Pseudo classes must follow the elemental selector if present.

This change is not mentioned in the grammar section.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions