Closed Bug 417596 Opened 16 years ago Closed 16 years ago

a second css (stylesheet file) isn't applied if both link rel tags are using a title universal attribute

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: mh.und, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021404 Minefield/3.0b4pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021404 Minefield/3.0b4pre

For HTML pages containing 2 style sheet references (both with a title attribute) only the first cascading style sheet will be used.

sample:
<link rel="stylesheet" type="text/css" href="style1.css" title="Style1">
<link rel="stylesheet" type="text/css" href="style2.css" title="Style2">



Reproducible: Always

Steps to Reproduce:
1. detach the attached HTML and CSS files to one directory
2. open the file index-style-title.html
3. open the file index-style-notitle.html
Actual Results:  
2. only stylesheet style1.css is applied
3. both stylesheets are applied

Expected Results:  
Firefox should render an identical output in 2. and 3.

See the attached files.

The problem occurs with different Mozilla Browsers (tested with Mozilla 1.7.8, Firefox 2.0.0.6, 2.0.0.11 and also the latest nightly build.

Workaround: If the title attribute for just one or both link rel tags is omitted it works.
Having a "title" attribute (without also having "alternate" in the "rel" attribute) makes the stylesheet a "preferred" stylesheet rather than a "persistent" stylesheet.  Firefox is following the HTML 4.01 spec here: "If two or more LINK elements specify a preferred style sheet, the first one takes precedence."

http://www.w3.org/TR/html401/present/styles.html#specifying-external

Unless following the spec is causing major compatibility problems, this bug is invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
> Unless following the spec is causing major compatibility problems, this bug is
> invalid.

Thanks for your comment and the included explaination. I agree.  

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: