Closed
Bug 283808
Opened 20 years ago
Closed 20 years ago
:before and :after pseudo-elements aren't applied to swlf-closing XHTML tags
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
DUPLICATE
of bug 241985
People
(Reporter: gordon.mcvey, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
682 bytes,
application/xhtml+xml
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 StumbleUpon/1.999 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 StumbleUpon/1.999 The :before and :after pseudo-elements don't seem to be applied to tags that are self-closing such as <input... /> and <img... /> Reproducible: Always Steps to Reproduce: View the following HTML in a Gecko browser. Compare the results against viewing the same page in Opera <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- input:before { content: "Foo "; } input:after { content: " Bar"; } img:before { content: "Foo "; } img:after { content: " Bar"; } ul:before { content: "Foo "; } ul:after { content: " Bar"; } --> </style> </head> <body> <p> <input type="text" name="textfield" /> </p> <p><img name="" src="" width="32" height="32" alt="" /></p> <ul> <li>Test</li> <li>Test</li> <li>Test</li> </ul> </body> </html> Actual Results: Foo and Bar get put before and after the list, but not before or after the image or the input control. Expected Results: The image andthe input control should have also been styled with :before and :after content
Comment 1•20 years ago
|
||
This is the example testcase, but as correct XHTML (style not commented out); that's what triggers for me this bug.
Comment 2•20 years ago
|
||
Dupe of 241985?
Comment 3•20 years ago
|
||
For me it looks very much the same. The problem aren't the empty tags (with hr, for example, it works (though it doesn't really look very aesthetic)), but the elements (input, img) already mentioned in bug 241985.
You need to log in
before you can comment on or make changes to this bug.
Description
•