- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Tue, 08 Nov 2022 16:39:38 +0000
- To: public-css-archive@w3.org
```js style.shorthand = 'a' ``` See #7195 for this case ```js style.shorthand = 'var(--custom)' style.longhand; // 'var(--custom)' ``` No, because we could have `--custom: b`, then `longhand` will compute to `c`, and `var(--custom)` is a bad serialization since `longhand: b` is invalid. ```js style.longhand = 'var(--custom)' style.shorthand; // 'var(--custom)' ``` Similarly, if `--custom: c`, then the shorthand will "compute" to `shorthand: b`, so `var(--custom)` is a bad serialization. See https://drafts.csswg.org/css-variables-1/#variables-in-shorthands > if any of the component [longhand properties](https://drafts.csswg.org/css-cascade-5/#longhand) for a given [shorthand](https://drafts.csswg.org/css-cascade-5/#shorthand-property) are [pending-substitution values](https://drafts.csswg.org/css-variables-1/#pending-substitution-value), or contain [var()](https://drafts.csswg.org/css-variables-1/#funcdef-var) functions of their own that have not yet been substituted, the shorthand property must serialize to the empty string. -- GitHub Notification of comment by Loirooriol Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3109#issuecomment-1307506131 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 8 November 2022 16:39:40 UTC