Closed
Bug 76174
Opened 25 years ago
Closed 25 years ago
[lang=en] selector fails to detect language specified via Content-Language HTTP headers
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mozbugzilla, Assigned: pierre)
References
()
Details
(Keywords: css2)
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
BuildID: 2001041520
According to the W3 HTML4.01 spec, an element should inherit language
information from the HTTP Content-Language header
(http://www.w3.org/TR/html401/struct/dirlang.html#h-8.1.2). Therefore, a
document served with these headers (say Content-Language : en) and a CSS2 rule
such as [lang|=en] {color:red} should colour all elements' content red
(assuming they don't set lang differently). The HTML code that illustrates
this is given at the bottom. This document may need to be served (rather than
just loaded as a file) for the Content-Language header to be inserted. The URL
I have given is served by a server configured to set the Content-Language
header to en, so the META http-equiv tag is really unnecessary as well as by
the http-equiv line in the source.
Reproducible: Always
Steps to Reproduce:
1. Go to the page referenced in the URL section.
2. Observe incorrect rendering.
Actual Results: The first paragraph is not rendered in italics. The second
paragraph is.
Expected Results: Both paragraphs should be rendered in italics.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>Testing lang</TITLE>
<META http-equiv="Content-Language" content="en">
<STYLE type="text/css">
[lang|=en] {
font-style: italic;
}
</STYLE>
</HEAD>
<BODY>
<P>This paragraph should be in italics as it should inherit the language
from the HTTP header.</P>
<P lang="en">This paragraph has had the lang="en" attribute set
explicitly. This works, but shouldn't be neccessary.</P>
</BODY>
</HTML>
Updated•25 years ago
|
Comment 1•25 years ago
|
||
invalid. [attr|=val] is defined to only work for specified attributes. What you
are talking about is :lang(), which we don't support but which has already got a
bug filed.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•