- From: Sam Weinig via GitHub <sysbot+gh@w3.org>
- Date: Thu, 12 Sep 2024 16:09:31 +0000
- To: public-css-archive@w3.org
weinig has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-animations] How should relative-length values be interpreted when used in the <keyframe-selector> production in the @keyframes prelude? == Assuming calc() is allowed here (see https://github.com/w3c/csswg-drafts/issues/10879), how should relative-length values be interpreted when used with in it? The [\<keyframe-selector\>](https://drafts.csswg.org/css-animations-1/#typedef-keyframe-selector) production in the [@keyframes](https://drafts.csswg.org/css-animations-1/#keyframes) prelude is defined via the grammar: > \<keyframe-selector\> = from | to | [<percentage [0,100]>](https://www.w3.org/TR/css-values-4/#percentage-value) So, for example, you could have: ```css @keyframes foo { from { margin-left: 0px; } calc(50% * sign(10em - 2px)) { margin-left: 100px; } from { margin-left: 200px; } } ``` 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 @keyframes. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10880 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 16:09:32 UTC