Closed Bug 84434 Opened 24 years ago Closed 24 years ago

CSS class styles do not apply when type="text/css" attribute is present

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 59619

People

(Reporter: golam, Assigned: pierre)

Details

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.1+) Gecko/20010606 BuildID: 2001060604 All class styles are completely broken if type="text/css" is present in <style> tag. See bug #53112 as (?possible?) antipod of this one. Complete HTML of the testcase: <HTML> <HEAD> <STYLE TYPE="text/css"> #r { color: #FF0000} .red { color: #FF0000} </STYLE> <STYLE> .red2 { color: #FF0000} </STYLE> </HEAD> <body> <B id="r">should be red</B> <br> <B CLASS="red">should be red</B> <br> <B CLASS="red2">should be red</B> </BODY> </HTML>
Attached file Testcase to demonstrate the problem (deleted) —
The testcase you uploaded contains a <!--STYLE--> comment after <STYLE TYPE="text/css">. In HTML you can mark the <STYLE> tags as comments and have the browser still recognize them (see http://www.w3.org/TR/html4/present/styles.html) If you remove that comment, Mozilla renders it correctly.
The problem seems to be in your new testcase, "TEXT/CSS" is in uppercase. If you change it to lowercase, Mozilla renders it properly. Will investigate to see whether this is a bug or not.
Changing summary to reflect true nature of bug,
Summary: CSS class styles do not apply when type="text/css" attribute is present → CSS class styles do not apply when type="text/css" is uppercase
There are many pages on the net that use such style definitions. See http://www.utro.ru for example.
Summary: CSS class styles do not apply when type="text/css" is uppercase → CSS class styles do not apply when type="text/css" attribute is present
Changing summary to indicate that STYLE TYPE is case sensitive.
Summary: CSS class styles do not apply when type="text/css" attribute is present → CSS class styles do not apply when type="text/css" is uppercase
According to the MIME-type RFC (http://www.ietf.org/rfc/rfc2045.txt section 5.1), the media type and subtype (text/css for example) is case always insensitive. Marking bug as NEW. If someone who knows more about this subject disagrees, feel free to change.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Sorry for all the spam. Can someone confirm this is a dupe of 59619?
I agree. *** This bug has been marked as a duplicate of 59619 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Summary: CSS class styles do not apply when type="text/css" is uppercase → CSS class styles do not apply when type="text/css" attribute is present
The part of bug 59619 that is related to the "text/css" mime type was fixed on June 20th.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: