[csswg-drafts] [cssom] getComputedStyle for non-existent pseudo-element

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

== [cssom] getComputedStyle for non-existent pseudo-element ==
https://drafts.csswg.org/cssom/#resolved-values

> width
> ...
> If the property applies to the element or pseudo\-element and the resolved value of the display property is not none or contents, then the resolved value is the used value\. Otherwise the resolved value is the computed value\.

See https://github.com/w3c/web-platform-tests/pull/7020

What should happen for `getComputedStyle(el, '::before').width` if el has no `::before` box generated? This appears to not be particularly well defined.

https://drafts.csswg.org/cssom/#terminology says

> In this specification the ::before and ::after pseudo-elements are assumed to exist for all elements even if no box is generated for them.

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

Received on Monday, 28 August 2017 08:07:48 UTC