Closed Bug 224014 Opened 22 years ago Closed 22 years ago

CSS selection based on MEDIA attribute in LINK tag is broken by presence of a TITLE attribute

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 223410

People

(Reporter: w.b.garvelink, Assigned: bugzilla)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Normally, when you specify multiple stylesheets in your HTML document with differing media attributes, Firebird will automatically pick the correct stylesheet depending on whether you're viewing the page in the browser, or sending it to the printer. However, this behaviour is broken when a title attribute is specified for both stylesheets. Reproducible: Always Steps to Reproduce: Using a page that incldues two seperate external stylesheets for media "print" and "screen", both of which have a TITLE defined in their LINK tag: 1. View the page in the browser 2. View the page in print-preview or just print it Actual Results: Firebird did not switch stylesheets. The page is printed un-styled because the original stylesheet doesn't include "print" in its media attribute. In addition, when you use View | Use Style and switch to the printer stylesheet, you'll see the opposite happen: the page is rendered un-styled in the browser (again because of incompatible media attribute), but rendered correctly in print instead. Expected Results: Firebird automatically selects the print stylesheet for print and the screen stylesheet for screen. - See the example URL - This bug may or may not be related to bug 223206 - Removing the title attribute from just one of the stylesheets restores expected behaviour
The server I put the demo files on may not always be available. I included the demo here.
You're using the title attribute incorrectly. See bug 223410 comment 1. *** This bug has been marked as a duplicate of 223410 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: