Skip to content

[css-values] Are the codepoints in an indentifier stored in escaped form or not? #12982

@Loirooriol

Description

@Loirooriol

Imagine a\ b is parsed as an <ident>. What are the code points of the produced ident?

  • Option 1: the indentifier is stored in escaped form
    1. a
    2. \
    3. b
  • Option 2: the indentifier is stored raw
    1. a
    2. b

https://drafts.csswg.org/css-values/#css-css-identifier seems to assume option 1:

CSS identifiers, generically denoted by <ident>, consist of a sequence of characters conforming to the <ident-token> grammar.

https://drafts.csswg.org/cssom/#serialize-an-identifier seems to assume option 2, since it escapes manually.

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