Skip to content

[cssom] Missing/outdated serialization rules for pseudo-classes #12669

@AtkinsSJ

Description

@AtkinsSJ

The spec algorithm for serializing pseudo-classes is outdated and missing a lot of newer ones. Specifically it currently lists:

  • :lang()
  • :nth-child(): Missing [of S]? handling
  • :nth-last-child(): Missing [of S]? handling
  • :nth-of-type()
  • :nth-last-of-type()
  • :not()

And is missing these from level 4:

  • :dir()
  • :is()
  • :has()
  • :where()
  • :nth-col()
  • :nth-last-col()

And from level 5:

  • :state()
  • :heading()

cc: @emilio @therealglazou

As a side note, would it be worth moving the logic for these into the selectors spec and having CSSOM refer to that? I think putting the serialization rules with the pseudo-elements themselves would help keep them up to date, and avoid the issue of which ones should be included in the serialization algorithm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions