If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

:before and :after pseudo-elements aren't applied to swlf-closing XHTML tags

RESOLVED DUPLICATE of bug 241985

Status

()

Core
Layout
--
minor
RESOLVED DUPLICATE of bug 241985
13 years ago
13 years ago

People

(Reporter: Gordon, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

682 bytes, application/xhtml+xml
Details
(Reporter)

Description

13 years ago
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

13 years ago
Created attachment 175641 [details]
Testcase

This is the example testcase, but as correct XHTML (style not commented out);
that's what triggers for me this bug.

Comment 2

13 years ago
Dupe of 241985?

Comment 3

13 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.

Comment 4

13 years ago

*** This bug has been marked as a duplicate of 241985 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Keywords: testcase
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.