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

weinig has just created a new issue for https://github.com/w3c/csswg-drafts:

== Specs that use CSS values outside of normal style rules should provide information on calc()/non-absolute length resolution in a uniform way ==
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](https://drafts.csswg.org/css-fonts/#font-palette-values)`:

> [Math functions](https://drafts.csswg.org/css-values-4/#math-function), such as [calc()](https://drafts.csswg.org/css-values-4/#funcdef-calc), and also [var()](https://drafts.csswg.org/css-variables-2/#funcdef-var), and [env()](https://drafts.csswg.org/css-env-1/#funcdef-env), are valid within descriptor values in a [@font-palette-values](https://drafts.csswg.org/css-fonts/#at-ruledef-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.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10853 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 8 September 2024 17:03:59 UTC