- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Sat, 11 Mar 2023 07:07:01 +0000
- To: public-css-archive@w3.org
> No, this is specifically not the case when serializing custom properties; see https://w3c.github.io/csswg-drafts/css-variables/#serializing-custom-props
Ok, so this is a browser issue.
```js
style.cssText = '--x: /* comment */ 1 /* comment */'
style.cssText; // (Chrome) `--x: 1 ;` (FF) `--x: 1 /* comment`
style.setProperty('--x', /* comment */ 1 /* comment */)
style.getPropertyValue('--x') // (Chrome/FF) `1`
```
Both may store comment representations with whitespace representations. FF does not remove trailing whitespaces (cf. #6484).
If `style(--x: 1)` should evaluate to `false` against `--x: /* comment */ 1 /* comment */`, I guess the original string representation might have to be created somehow when consuming a declaration.
--
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8533#issuecomment-1464847308 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 11 March 2023 07:07:03 UTC