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

Re: Splitting background-position in two different attributes

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 18 Aug 2011 10:52:45 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Brian Manthos <brianman@microsoft.com>, Øyvind Stenhaug <oyvinds@opera.com>, Alan Gresley <alan@css-class.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20110818175245.GA20737@pickering.dbaron.org>
On Thursday 2011-08-18 10:17 -0700, Tab Atkins Jr. wrote:
> On Thu, Aug 18, 2011 at 10:00 AM, Brian Manthos <brianman@microsoft.com> wrote:
> > Again, an example...
> >        background: blue;
> > is not equivalent to...
> >        background-color: blue;
> > but rather...
> >        background-attachment: scroll;
> >        background-clip: border-box;
> >        background-color: blue;
> >        background-image: none;
> >        background-origin: padding-box;
> >        background-position: 0% 0%;
> >        background-repeat: repeat;
> >        background-size: auto;
> 
> Or, somewhat more simply:
> 
> background-attachment: initial;
> background-clip: initial;
> background-color: blue;
> background-image: initial;
> background-origin: initial;
> background-position: initial;
> background-repeat: initial;
> background-size: initial;

Though depending on the rules for serialization of shorthands, this
may be a bad idea.  In particular, since inherit and initial can't
be used within a shorthand, Gecko follows the rule that if some
subproperties of a shorthand are inherit or initial, then in order
for the shorthand to serialize as other than "", all must be.  This
vastly simplifies serialization code (and, if we ever specify it,
specification).

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla Corporation               http://www.mozilla.com/   𝄂
Received on Thursday, 18 August 2011 17:53:40 GMT

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