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.
Assignee | ||
Comment 5•20 years ago
|
||
*** Bug 252834 has been marked as a duplicate of this bug. ***
Comment 6•20 years ago
|
||
*** Bug 257934 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Summary: img:before { content: "text"; } no longer works → img:before { content: "text"; } no longer works [GC]
Comment 7•20 years ago
|
||
*** Bug 259770 has been marked as a duplicate of this bug. ***
Comment 8•20 years ago
|
||
*** Bug 292849 has been marked as a duplicate of this bug. ***
Comment 9•19 years ago
|
||
*** Bug 319849 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•