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

Re: background-print

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 12 Aug 2011 10:24:05 -0700
Message-ID: <CAAWBYDDcfHC1+jyHJaEQ+aWsJXgv+mxVvP9KhzvXnaWaES35nw@mail.gmail.com>
To: Håkon Wium Lie <howcome@opera.com>
Cc: Florian Rivoal <florianr@opera.com>, www-style@w3.org
On Fri, Aug 12, 2011 at 8:37 AM, Håkon Wium Lie <howcome@opera.com> wrote:
> Also sprach Florian Rivoal:
>
>  > > The start of the thread, in the above URL reads:
>  > >  Want authors to be able to specify whether backgrounds should be printed
>  > > And this code turns off printing of backgrounds:
>  >
>  > 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.

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.  However, the user should still have control
over this, either through the UA enforcing something at a higher level
than CSS, or through a (possibly virtual) !important user stylesheet.

~TJ
Received on Friday, 12 August 2011 17:25:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:43 GMT