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

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

From: Håkon Wium Lie <howcome@opera.com>
Date: Tue, 16 Aug 2011 09:36:11 +0200
Message-ID: <20042.7659.344439.713147@gargle.gargle.HOWL>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
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)?

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

 > (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.

 > (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.

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

 > (4) Create a new property controlling this
 > Same as (3), but the last option becomes "print backgrounds on
 > elements with this property set".
 > This has the advantage that, as something new, it won't be noisy (at
 > least at first).
 > Possible ideas for syntax:
 > printer-friendly-colors: _auto_ | avoid
 > printer-color-adjust: _auto_ | avoid
 > printer-colors: _auto_ | exact

The noise would arrive soon enough. 

There's also a cost to creating a new syntax.


There's also another option. The purpose of the proposal is to add
metadata to style sheets -- to making assessments about certain other
declarations in the CSS style sheets (e.g.: "the backgrounds are fit
for printing, really, trust me"). CSS already has a syntax for making
such assessments: the exclamation mark.

It's used today in "!important", but could be extended with other
keyword. For example:

  html { background: red !printer-friendly }

This method avoids creating inter-depedency between properties. 


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.

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

              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Tuesday, 16 August 2011 07:36:54 UTC

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