Skip to content

[css-syntax-3] <percentage-token> type flag is never set #5483

Closed
@Fayti1703

Description

@Fayti1703

Tokenization defines the type flag on three tokens -- <number-token>, <percentage-token> and <dimension-token>, and assigns it a default value of "integer".

Consume a numeric token specifically sets the type flag on <number-token>s and <dimension-token>s to the one in the number returned from Consume a number, using the wording

create a <xxx-token> with the same value and type flag as number

However, this type flag isn't assigned for <percentage-token>s, as that just says

create a <percentage-token> with the same value as number, and return it.

A strict reading of the spec suggests that therefore, a <percentage-token> always has a type of "integer", even if it's value is, for instance, 50.90, which seems wrong.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions