Re: background-print

Also sprach Tab Atkins Jr.:

 > >  > Authors don't want to turn off printing of backgrounds, they want to turn
 > >  > it on, as various browsers automatically turn them off by default to save
 > >  > ink or improve readability. A way to override that is what we are looking
 > >  > for.
 > >
 > > We could do this by defining where in the cascade the user setting is
 > > defined.
 > >
 > > For example, this could could be overridden by the user setting:
 > >
 > >  html { background: red }
 > >
 > > while this would be printed:
 > >
 > >  html { background: red !important }
 > This doesn't work at all with the existing specificity rules, and it's
 > a bad idea anyway.
 > It doesn't work with existing specificity because normal user rules
 > are below author rules, while !important user rules are *above*
 > !important author rules.  You're looking for a specificity level
 > *between* normal author and !important author rules, and that doesn't
 > exist.

We don't need any such level -- we will simply use the !important as a
flag to signal that, um, something is important. Seems spot on.

We basically did the same to handle non-CSS presentational hints:

 > It's a bad idea anyway because we don't actually want the author to
 > have control over this.  We want them to be able to *hint* that
 > they've thought of printing and thus it's probably okay to let them
 > print what they want. 

And I'm suggesting that authors could use !important to express that hint. 

It's an option that doesn't require any new CSS properties or syntax,
and, as such, is lightweight and elegant.

However, I'm not convinced users will welcome the a new third level of
user preference. And it's hard to label it. On/off/auto works in CSS
values, but I'm not sure it can be used with the current "print
background images" which tend to be binary choices.


              Håkon Wium Lie                          CTO °þe®ª        

Received on Monday, 15 August 2011 23:31:04 UTC