Status: Unconfirmed
Owner: ----
Labels: OS-Mac Area-Undefined Pri-2 Type-Bug
New issue 125719 by
d...@gapps.semantico.com: :before/:after pseudo
elements not working with css[attribute] selectors unless elements have
already been styled
http://code.google.com/p/chromium/issues/detail?id=125719
Chrome Version : 18.0.1025.165
OS Version: OS X 10.7.3
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Chrome Canary 20.0.1123.0: Fail
Safari 5: OK
Firefox 12: OK
Opera 11.62: OK
IE 9: OK
What steps will reproduce the problem?
1. Use a combination of a css attribute selector and a pseudo element to
add content to an element
e.g:
h1[id]:after { content: "after"; }
What is the expected result?
Browser should match the selector and add the pseudo element
What happens instead?
In a vanilla situation will fail to match the item and will not add the
pseudo element. (see test-1.html)
If we add some style to the same css attribute selector it will now match
and add the pseudo selector as expected (see test-2.html)
If we also match the ID of a element and style it, the pseudo element will
be created but only for the element that we have just targeted, and not all
the other elements that our css attribute selector _should_ match (see
test-3.html)
Please provide any additional information below. Attach a screenshot if
possible.
Attached a screenshot, but not sure how useful it is!
UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3)
AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.165 Safari/535.19
Attachments:
test-1.html 293 bytes
test-2.html 332 bytes
test-3.html 354 bytes
Screen Shot 2012-05-01 at 13.31.49.png 58.2 KB