Closed
Bug 215770
Opened 22 years ago
Closed 22 years ago
ignored if inserted due to CSS :before or :after pseudo-properties
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 207461
People
(Reporter: dparnell, Unassigned)
References
()
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
When using a style sheet that specifies :before or :after pseudo-properties that have a content of " ", the ' ' is literally inserted rather than being rendered as a non-breaking space.
eg...
------------ CSS Style contains...
P.termdefn:before
{
content: ' '
}
P.termdefn:after
{
content: ' '
}
--------------- HTML file contains...
<link rel="stylesheet" href="styles/prime.css" type="text/css"
media="screen,projection" title="prime">
<p class="termdefn">Version</p>
-------------------- Page is rendered as ...
Version
Reproducible: Always
Steps to Reproduce:
1.Create a style sheet with above content...
2.Reference the style sheet and the style
3.Viola!
Actual Results:
Page rendered with ' ' literally inserted.
Expected Results:
The ' ' should have been replaced with a non-breaking space
IE 6 and Opera 7 render this correctly.
Comment 1•22 years ago
|
||
This is correct behavior. It's supposed to render literally what you put in the
string.
If you want the effect you expected, you need character escapes. See
http://www.w3.org/TR/CSS21/syndata.html#q4
If Opera 7 really does that, you should file a bug with them. They'd probably
like to know about it.
*** This bug has been marked as a duplicate of 207461 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Comment 2•22 years ago
|
||
IE6, btw, doesn't do this correctly because it doesn't support :before and
:after to start with.
Reporter | ||
Comment 3•22 years ago
|
||
I've replaced the style sheet definitions with ...
P.termdefn:before
{
content: '\0000A0'
}
P.termdefn:after
{
content: '\0000A0'
}
adn now both Mozilla and Opera render it correctly and IE6 (as you correctly stated) doesn't support :after and :before still.
You need to log in
before you can comment on or make changes to this bug.
Description
•