- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Tue, 01 Feb 2022 17:54:18 +0000
- To: public-css-archive@w3.org
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts: == [cssom-1] Serialize `CSSKeyframesRule` name depending on its type == To [serialize a CSSKeyframesRule](https://drafts.csswg.org/cssom/#serialize-a-css-rule), the name should be serialized as an identifer: > 2. The serialization as an identifier of the name attribute. > 3. The result of performing serialize a CSS rule on each rule in the rule’s cssRules list, separated by a newline and indented by two spaces. But its production rule is `<keyframes-name> = <custom-ident> | <string>`. ```css @keyframes "my Animation" { to { color: green } } ``` ```js const { styleSheets: [{ cssRules: [{ cssText }] }] } = document console.log(cssText) ``` Result in Chrome: ``` @-webkit-keyframes my Animation { 100% { color: green; } } ``` Result in Firefox: ``` @keyframes "my Animation" { 100% { color: green; } } ``` Firefox is missing the indentation but the important thing is that keyframes name is serialized as a string. But I feel like it should be serialized as a string, for round tripping (parsing `CSSKeyframesRule.cssText` should result to a valid `CSSKeyframesRule`. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7004 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 1 February 2022 17:54:20 UTC