Skip to content

[css-counter-styles] How should relative-length values be interpreted when used in @counter-style descriptors? #10877

Open
@weinig

Description

@weinig

How should relative-length values be interpreted when used in @counter-style descriptors?

The grammars for @counter-style descriptors, for example, 'range', allow the use of relative-length values due to the fact that calc() allows for them.

For example, using 'range' again:

@counter-style a {
  range: infinite calc(3 * sign(10em - 2px));
}

So the question is, what does 10em evaluate to? @font-palette-values contains this text:

Math functions, such as calc(), and also var(), and env(), are valid within descriptor values in a @font-palette-values rule. They are evaluated within the context of the root element. Relative units are also evaluated within the context of the root element.

but I can't find any similar text for @counter-style.

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