Re: Printing and background colors/images

On 02/22/2011 09:17 AM, Ian Fette (イアンフェッティ) wrote:
> Summary: Want authors to be able to specify whether backgrounds should be printed.
> ...
> In talking with other people on Chrome team, we managed to brainstorm a few options, though I am not set on any of them and
> would really appreciate feedback on which of these is preferable, or any other options as well.
>
> 1. Just print all backgrounds. ...
>
> 2. Print backgrounds only if explicitly specified inside of a @media print{} block. ...
>
> 3. Add an explicit new property, like print-background. ...
>
> I'm not in love with any of the options, but I really want to get /something/ in place. ...
>
> Thoughts?

I wrote a patch for Mozilla that enabled the printing of backgrounds for any
page that had a print-specific style sheet. This is similar to #2, except that
it turns on backgrounds globally, rather than only within the @media block.

https://bugzilla.mozilla.org/show_bug.cgi?id=381466

The patch also included a three-state user preference instead of a two-state one:
Printing backgrounds was either a) completely off b) completely on c) automatic
as described above.

I felt that the existence of a print style sheet was adequate indication that
the author was thinking about print and not going to waste ink. dbaron felt it
was too magic, and that an explicit control was necessary. The patch never went
anywhere.

Any change to default behavior here would work best if deployed somewhat
simultaneously across browsers, as it does affect people who think that
backgrounds never print and do silly things like
   html { background: black; color: white; }
   @media print {
     html { color: black;
   }
However, I will note that there are UAs that print backgrounds by default, so
any style sheet author that is assuming backgrounds will not print is already
creating problems for such users.

~fantasai

Received on Wednesday, 23 February 2011 19:06:56 UTC