W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: Printing and background colors/images

From: イアンフェッティ <ifette@google.com>
Date: Tue, 22 Feb 2011 09:55:16 -0800
Message-ID: <AANLkTikVdTt8+sSiU516T8aY0QaNUmAvN0chFHUzXiWQ@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: www-style@w3.org
On Feb 22, 2011 9:52 AM, "Simon Fraser" <smfr@me.com> wrote:
> On Feb 22, 2011, at 9:17 AM, Ian Fette (イアンフェッティ) wrote:
> >
> > 2. Print backgrounds only if explicitly specified inside of a @media
print{} block. Pros: Relatively explicit in terms of author intent, wouldn't
require any major spec changes. Cons: Leads to some strange cases, e.g. if I
specify ".highlight {background-color: yellow}" for highlighted text, I also
have to explicitly specify "@media print { .highlight { background-color:
yellow} }" ? Also, in WebKit, and presumably other browsers, this may lead
to implementation difficulty as currently, all the styles are processed and
then applied, and no state is kept as to where the style came from. When
it's time to paint, the style is overridden if the option to print
background colors is in its default state (false), and so this would require
carrying around extra state for each resultant style to track if it came
from a @media print{} block, which is both a bit heavy, and hacky. It could
work though.
> The problem with this method is that you're changing the way that the
cascade works, for some subset of properties. I think that's a bad idea,
and, as you note, it has implementation complexity.
> Simon

Received on Tuesday, 22 February 2011 17:55:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:43 UTC