Closed
Bug 245633
Opened 21 years ago
Closed 21 years ago
img:before { content: "text"; } no longer works [GC]
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bugzilla, Assigned: dbaron)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040604 Firefox/0.8.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040604 Firefox/0.8.0+ Using CSS such as img:before {content: "text"; } was working in the Firefox 0.8 release. Using a recent Firefox 0.9 branch build [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040604 Firefox/0.8.0+] this CSS no longer works. I have been unable to find any mention of this in Bugzilla, but saw the following post in the forums: http://forums.mozillazine.org/viewtopic.php?t=69087 Reproducible: Always Steps to Reproduce: 1. Add the following CSS to a page: img:before { content: "text"; } Actual Results: The text does not appear. Expected Results: The text should appear before all images.
Comment 1•21 years ago
|
||
'::before' and/or '::after' don't apply to replaced elements.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 2•21 years ago
|
||
Oh yes? Then how did this example creep into the CSS2 specification: ----- 12.2 The 'content' property (...) The next rule inserts the text of the HTML "alt" attribute before the image. If the image is not displayed, the reader will still see the "alt" text. IMG:before { content: attr(alt) } ----- In case this was changed in CSS2.1, CSS3 or with an Errata then at least say so.
Comment 3•21 years ago
|
||
You should not look in CSS 2.0. It is bogus for quite some parts, especially that example is really bad. They never really thought about it, I guess.
Comment 4•21 years ago
|
||
(In reply to comment #3) Ok, after looking at 169334 I see the Mozilla crew has decided that the current implementation is the right one. I don't no whether it matters but I think duplicate of bug 169334 would be the better resolution of this bug: to point people searching bugzilla for an explanation why that example doesn't work any more in the right direction.
Updated•20 years ago
|
Summary: img:before { content: "text"; } no longer works → img:before { content: "text"; } no longer works [GC]
You need to log in
before you can comment on or make changes to this bug.
Description
•