[csswg-drafts] [css-fonts] How should relative-length values be interpreted when used in @font-face descriptors? (#10876)

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

== [css-fonts] How should relative-length values be interpreted when used in @font-face descriptors? ==
How should relative-length values be interpreted when used in @font-face descriptors?

The grammars for @font-face descriptors, for example, ['size-adjust'](https://www.w3.org/TR/css-fonts-5/#descdef-font-face-size-adjust), allow the use of relative-length values due to the fact that `calc()` allows for them. 

For example, using 'size-adjust' again:

```css

@font-face {
   size-adjust: calc(50% * sign(10em - 2px));
}
```

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

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

but I can't find any similar text for @font-face.

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


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

Received on Thursday, 12 September 2024 15:37:37 UTC