- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 22 Feb 2011 17:11:06 -0800
- To: Jon Rimmer <jon.rimmer@gmail.com>
- Cc: ifette@google.com, Simon Fraser <smfr@me.com>, Brad Kemper <brad.kemper@gmail.com>, "www-style@w3.org" <www-style@w3.org>
On Tue, Feb 22, 2011 at 4:55 PM, Jon Rimmer <jon.rimmer@gmail.com> wrote: > So, right now, browsers are not conforming to CSS 2.1 by ignoring > background properties when printing. Requiring backgrounds to be > duplicated in a print stylesheet, or adding a new property that > applies only to print media would essentially standardise this > non-conformity as part of CSS 3. This seems wrong. Why does it seem wrong? Browsers have agreed pretty uniformly that printing backgrounds is bad, despite the fact that it's technically required. The correct course of action is thus to specify that behavior, rather than leaving the spec in conflict with reality. > My suggestion of a default user-agent print stylesheet that turns off > backgrounds would at least resolve this non-conformity. However, a > more 'proper' solution would seem to be reorganising the CSS 2.1 media > types to reflect the reality of browser behaviour. This could be done > by creating a new media group called, perhaps, 'visual-decorative', > into which the background properties would be moved. The 'screen' > media type would map to this group, but print would not. You could > then create an additional media type called 'print-rich', which > _would_ map to 'visual-decorative'. > > Browser behaviour could then be to default to 'print' media type for > printing, unless a stylesheet has been linked that is mapped to the > 'print-rich' media type like so: > > <link rel="stylesheet" href="foo.css" media="screen, print-rich" /> > > This would also allow users to specify both print and print-rich > stylesheets, and also mean that browsers current ability to turn > on-and-off background printing would be relatable to CSS, as it could > represent the choice between defaulting to printing using the 'print' > media type vs the 'print-rich' type. > > Obviously, it's not ideal to be making changes like this to CSS 2.1 at > this point, but if the alternative is that it will be perpetually > wrong, it seems preferable. I'm not sure I like this. It requires magic behavior switching based on the presence or absence of a stylesheet matching a particular media declaration. This seems similar to Opera's full-screen-mode switching based on whether or not there's a media=projection stylesheet somewhere in the document (if there is, match 'projection' but not 'screen', if not, match 'screen'), which I believe is a fairly clumsy design decision. ~TJ
Received on Wednesday, 23 February 2011 01:11:58 UTC