Broken example

Context

This page, its companion page and the two linked stylesheets serve as an example for MozillaFirebird bug #224014 that I reported.

Normally, when you specify two stylesheets in your HTML document, one with media=screen and one with media=print, Firebird will automatically pick the correct stylesheet when 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.

To reproduce

1) View this page in the browser, make a mental note of the purple background and the presence of the menu block.
2) Now select Print Preview or just print the page.

Expected result

That the page is now black-and-white, and that the menu block has been hidden.

Actual result

The page is rendered without styling.

Relevant code

In the html header, the stylesheets are included like this:

<link rel="stylesheet" type="text/css" 
      title="Normal stylesheet" 
      href="screen.css" media="screen"/>
<link rel="stylesheet" type="text/css" title="Printer stylesheet" href="print.css" media="print"/>

The thing to notice is the presence of the title attribute in combination with the media attribute.


(PRINTER STYLESHEET)

(SCREEN STYLESHEET)