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

initial, inherit, and shorthands (was Re: Splitting background-position in two different attributes.)

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 18 Aug 2011 12:52:05 -0700
To: Brian Manthos <brianman@microsoft.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Øyvind Stenhaug <oyvinds@opera.com>, Alan Gresley <alan@css-class.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20110818195205.GA27157@pickering.dbaron.org>
On Thursday 2011-08-18 18:29 +0000, Brian Manthos wrote:
> '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.'
> Actually, wait, that's incorrect.  Sub-values at the "set at
> initial" state are represented by the absence of them in the
> shorthand.

That's only true for a few shorthands; each shorthand is different
in terms of whether parts can be omitted and what happens to those
parts if it's not there.

And in no cases can a part be the 'initial' or 'inherit' keyword.

So, given:
  shorthand: some value;
  longhand-within-shorthand: initial;
one can't make a general statement that it's still possible to
serialize a value of 'shorthand' representing the pair of

In Gecko, we use 'initial' as our internal representation (and what
we serialize) only when the 'initial' keyword was used to specify
the value.  For omission within shorthands, I made an explicit
decision *not* to use 'initial' but instead to use the actual
initial value, for the serialization reasons I described.


π„ž   L. David Baron                         http://dbaron.org/   𝄂
𝄒   Mozilla Corporation               http://www.mozilla.com/   𝄂
Received on Thursday, 18 August 2011 19:52:56 UTC

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