Working 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

As expected

Relevant code

This is the broken example. In the html header, the stylesheets are included like this:

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

(PRINTER STYLESHEET)

(SCREEN STYLESHEET)