- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Thu, 16 Mar 2023 14:08:48 +0000
- To: public-css-archive@w3.org
CSS Syntax 3 says (emphasize added): > Implementations ***may*** preserve the contents of comments and their location in the token stream https://drafts.csswg.org/css-syntax-3/#serialization But either implementations ***must*** preserve comments, or CSS Variables should not require serializing with comments. I also note that serializing `--x: 1 !important /**/` would produce `--x: 1 !important` (a new whitespace is added): > If the `important` flag is set, append `" !important"` https://drafts.csswg.org/cssom-1/#serialize-a-css-declaration I deleted my comment where I said that serializing exactly as specified only for `<declaration-value>` could help evaluating `style(--y: /**/ var(--x))` to true when given `--x: 1` and `--y: var(--x)`. This would work only if not preserving comments and consecutive whitespaces. Preserving the whole declaration string would also prevent `--x: mix(75%; 0; 2)` from matching `style(--x: 2)`. But here again, this would require to change how custom property values serialize. -- GitHub Notification of comment by cdoublev Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8533#issuecomment-1472051932 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 16 March 2023 14:08:50 UTC