[cssom] getComputedStyle and shorthands. (original) (raw)

Currently https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle says:

declarations: All longhand properties that are supported CSS properties, in lexicographical order, with the value being the resolved value computed for obj using the style rules associated with doc.

Which means that getComputedStyle(document.documentElement).font shouldn't be present, since it's a shorthand.

This is inconsistent with https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue, though which handles shorthands.

Should ComputedStyle.getPropertyValue handle shorthands? If so, should they be exposed as a property in the declaration object?

Right now answers from browsers to "does getPropertyValue handle shorthands?", and "are shorthands exposed as a property?" are:

What should happen here?

Note that both FF and Edge have a special-case for overflow, which used to be a longhand.