Skip to content

[css-values] Specs that use CSS values outside of normal style rules should provide information on calc()/non-absolute length resolution in a uniform way #10853

Open
@weinig

Description

@weinig

There is an ever growing number of places that use CSS values outside of normal style rules. There are the ones within the umbrella of CSS, such as various at-rules like @font-face, @font-palette-values, etc, and in media query syntax. And there are the ones outside that umbrella, like HTML Canvas, which uses CSS values in a number places such as for declaring colors, fonts and filters, or the Geometry module's rules for parsing a matrix from a string.

Some of these define exactly what to do with calc() and/or non-absolute length values. For instance, CSS Fonts has this to say for @font-palette-values:

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.

Great stuff. But finding similar rules, even in the same spec for @font-face or @font-feature-values is not something I was able to do.

I would be very helpful if there was some uniformity across specs on how this information was defined.

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