Re: [css3-gcpm] Printing backgrounds (thread reboot)

On Tue, Aug 16, 2011 at 12:36 AM, Håkon Wium Lie <> wrote:
> Also sprach Tab Atkins Jr.:
>  > Here are the options that have been brought up so far, along with my commentary:
>  >
>  > (1) Honor any style present in a print stylesheet.
>  >
>  > This doesn't work because the default media of a stylesheet is "all",
>  > which means that it's a print stylesheet.  Thus, this wouldn't match
>  > current behavior.
> I don't understand the difference between (1) and (2) -- what's the
> difference between a "print style sheet" (1) and "a stylesheet that
> is specifically media='print'" (2)?

A media="all" stylesheet is a print stylesheet, as it applies when printing.

> Also, I don't understand why "match current behavior" is a requirement
> -- aren't you trying to change current behavior?

"Current behavior" means "by default, screw with the page to make it
more printer-friendly".  We're trying to make it so that you can
specify a different default, but not to change the behavior of
unaltered pages.

>  > (2) Honor any style present in a stylesheet that is specifically
>  > media='print' (or in an equivalent @media block)
>  >
>  > This seems hacky, as we don't otherwise attach meaning to the precise
>  > way you phrase the media query.  This is similar to how Opera handles
>  > full-screen styles (if a media=projection stylesheet is present, use
>  > it; otherwise, act like you match 'screen').
> I think you are misrepresenting what Opera is doing. Pressing F11
> doesn't mean "Go into projection mode as per CSS". Rather, it means
> "go into fullscreen" (like other browsers do). There, we honor
> "screen" style sheets (like other browsers do). However, if there are
> "projection" style sheets present, Opera switches to "projection"
> mode. As such, F11 do more things in Opera than in other browsers. But
> this is a UI issue and not a CSS spec issue.

If it's proposed as an option (like Fantasai is doing below), then
it's definitely a CSS issue.

>  > (3) Honor !important backgrounds
>  >
>  > In other words, the user's preferences would be "don't print
>  > backgrounds", "print all backgrounds", and "print !important
>  > backgrounds" (with the last being the default)
>  >
>  > I'm not sure how compatible this would be.  People use !important for
>  > a lot of reasons, so it may be a pretty noisy signal, and not
>  > something you want to rely on by default.
> I don't think we'll be able to design something that we can rely on by
> default. Just like you cant't trust spammers to correctly label their
> messages as spam, you can't rely on authors to correctly label their
> content; some of them would very much like for you to waste precious
> ink printing their advertisements.
> Here's an example from 2007:
> The text is in Norwegian, but it's easy enough to see what
> billettservice (ticketmaster) is doing: when sending me three tickets
> (which would easily fit on one sheet), they use three sheets and put
> colorful advertising underneath.
> These people would be the first to claim that backgrounds etc. are
> very important.

I already talked about this in the first email in this thread.  This
is only meant to address the default behavior; users should still have
a choice about what to do.

> The only effect "!important" has for an author is to override other
> backgrounds set by the authors, so I don't think we'd find many
> examples of "!important" in the wild. Have you done any research on
> how many people have labeled their backgrounds as important at this
> stage?

You'd be surprised how often !important is used when people get
confused by the specificity of their badly-written stylesheets.

That said, !important is still a bad solution for at least two reasons:

1) Using !important messes with the cascade, which means you'll likely
have to spread the use of !important relatively widely.  (This can be
mitigated by minting a new !-rule that doesn't interfere with the

2) More than backgrounds are affected by printing.  IE9 also
suppresses box-shadows, for example.  Presumably this means that
authors would have to tag any use of box-shadow as !important as well.
 What if browsers start suppressing another type of visual effect,
like border-image?  Will you have to preemptively tag everything that
might be suppressed, just in case?

> My tentative conclusion is:
>  - I'm sceptical that the self-labelling scheme will work in
>    practice, as there will be too much mis-labelling for users to
>    rely on this information
>  - the added third level will increase the complexity of browser UIs.
>    Typically, you will need to use a radio button rather than a
>    checkbox to set the preference.

Both of these are problems common to every solution.

>  - still, if implementors would like to try this, they can do so
>    today using "!important" -- there is no need for new CSS syntax

I've given reasons above why !important isn't a good solution.


Received on Tuesday, 16 August 2011 21:01:50 UTC