Re: [csswg-drafts] [cssom] getComputedStyle and shorthands.

I have an impression that not having shorthands in gCS result was also intended for forward compatibility. That might be a discussion with @dbaron three years ago, but I don't recall the reasoning exactly.

I would guess the reason is something like, when a new longhand property is added to a shorthand, and the new property contains some value which is not expressible in the shorthand, the shorthand may fail to serialize. If there is code relying on serialization of shorthand, they may fail unexpectedly in browsers with the new property, leading to webcompat issue and making it harder to ship some new properties. Obvious past examples may include `border` and `font`.

This argument may also apply to specified value as well, but my understanding is that computed value is usually more useful to interpret for scripts (since that's a step closer to the value engine actually uses), while specified value is often just used for setting. That means keeping serialization forward and backward compatible is probably more important for gCS than for specified value.

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

Received on Thursday, 3 May 2018 06:46:09 UTC