This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29006 - What should happen when calling getComputedStyle for a pseudo that doesn't exist?
Summary: What should happen when calling getComputedStyle for a pseudo that doesn't ex...
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-29 21:37 UTC by David Zbarsky
Modified: 2015-09-04 09:01 UTC (History)
0 users

See Also:


Attachments
Testcase (237 bytes, text/html)
2015-07-29 21:37 UTC, David Zbarsky
Details

Description David Zbarsky 2015-07-29 21:37:59 UTC
Created attachment 1618 [details]
Testcase

https://drafts.csswg.org/cssom/#extensions-to-the-window-interface

[[
If pseudoElt is as an ASCII case-insensitive match for either ':before' or '::before' let obj be the ::before pseudo-element of elt.
If pseudoElt is as an ASCII case-insensitive match for either ':after' or '::after' let obj be the ::after pseudo-element of elt. 
]]

The attached testcase alerts "auto" in Firefox, "50px" in Chrome and Safari, and "" in Opera.  What should the behavior be when the pseudoelement doesn't exist?
Comment 1 Simon Pieters 2015-09-04 09:01:47 UTC
The terminology section 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."
https://drafts.csswg.org/cssom/#terminology

But that might not make it clear how it should behave; I'll look into this.