[csswg-drafts] [css-variables] Serialize shorthand for longhands with equivalent pending substitution value (#7983)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-variables] Serialize shorthand for longhands with equivalent pending substitution value ==
> If all of the component longhand properties for a given shorthand are pending-substitution values from the same original shorthand value, the shorthand property must serialize to that original (`var()`-containing) value.

*the same original shorthand value* seems to imply that the shorthand cannot serialize if all its longhands are individually declared to an equivalent value. If so, why?

I suggest to allow a shorthand to serialize if representations of its longhand declaration values are the same.

```js
style.borderBlockStartWidth = 'var(--custom)'
style.borderBlockInlineWidth = 'var(--custom) /* comment */'
style.borderBlockWidth; // ''
style.borderBlockInlineWidth = 'var(--custom)'
style.borderBlockWidth; // 'var(--custom)'
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7983 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 31 October 2022 08:36:43 UTC