Closed Bug 68417 Opened 24 years ago Closed 24 years ago

W3C CUAP: Respect media descriptors when applying style sheets

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gerv, Assigned: pierre)

References

()

Details

(Whiteboard: (py8ieh: check 2001-04-06 06:28 comment))

[ This bug is one of the recommendations in the W3C's "Common User Agent 
Problems" document, URL above. One bug has been filed on each recommendation, 
for deciding whether we do it and, if not, whether we should. ]

2.2 Respect media descriptors when applying style sheets.

     Some markup and style sheet languages allow authors (e.g., @media
     construct in [CSS2], media attribute in [HTML 4.01]) to design
     documents that are rendered differently according to the
     characteristics of the output device: whether graphical display,
     television screen, handheld device, speech synthesizer, braille
     display, etc.
Blocks: 68427
To test: Find (or set up) a document which has different screen and printer style 
sheets, and print it. If it prints using the screen style sheet, this bug is 
valid.
Keywords: qawanted
Hardware: PC → All
This is already fixed long time ago.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
It seems that this bug is perhaps not as dead as it appears. My site has the
following on all its pages:

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

where dc-mono-10-print.css @imports dc-mono-10.css. (Both stylesheets are found
by Mozilla - dc-mono-10-print.css uses css2's @media print {} construct to
delimit all print specific stuff, so using it as the screen style ought to
produce results identical to dc-mono-10.css. It does.) However, when I print the
document, the print turns out *not to have author style at all*, but to use the
Mozilla default.

Second, I don't think the non-screen media stylesheets should be user selectable
in the browser, but that the selection based on media type should be automatic.
There is no sense in letting the user select an incompatible style for the screen.

Third, I'm not at all sure how Mozilla would react if there were to be multiple
(one master, many alternate) stylesheets for each media type. E.g. how would one
select the alternate print style, below?

<link rel="stylesheet" type="text/css" href="s1.css" media="screen"/>
<link rel="alternate stylesheet" type="text/css" href="s2.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="s3-p.css" media="print"/>
<link rel="alternate stylesheet" type="text/css" href="s4-p.css" media="print"/>

I think the user should be given a choice by a print dialog. This would also 
make it possible for the user to choose "none" for the print style.
Sampo: I think you may have found some good edge cases. I would suggest you open 
a bug to track the first one. Then, produce a page which exhibits the second 
scenario, and see what happens. Then, file a bug on that one as well :-)

Gerv
Keywords: qawanted
Whiteboard: (py8ieh: check 2001-04-06 06:28 comment)
You need to log in before you can comment on or make changes to this bug.