Re: Printing and background colors/images

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
>

Agreed

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