Re: [csswg-drafts] [cssom] How safe is it really to shorthandify properties? (#8398)

The PITA was `getPropertyValue()` failing to serialize shorthands in a computed style, which used to happen in Firefox, but works now as resolved in #2529.

Not including shorthands in `item()` seems desirable to me.

Whether a shorthand can be serialized is defined in https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue, basically:
 - All longhands are present.
 - Either all longhands have `!important`, or no longhand has `!important` (this is always the case for `getComputedStyle()`).
 - The shorthand can exactly represent the values of all the longhands.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8398#issuecomment-1446589390 using your GitHub account


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

Received on Monday, 27 February 2023 15:58:49 UTC