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

RESOLVED INVALID

Status

()

Core
Layout
--
minor
RESOLVED INVALID
10 years ago
10 years ago

People

(Reporter: Matthias Hund, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
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.
(Reporter)

Comment 1

10 years ago
Created attachment 303373 [details]
HTML and CSS files for reproducing the bug

Comment 2

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → INVALID
(Reporter)

Comment 3

10 years ago
> 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.