W3C home > Mailing lists > Public > www-style@w3.org > October 2010

Re: 'initial' | 'inherit' inconsistency

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 28 Oct 2010 10:58:43 -0700
Message-ID: <AANLkTimpZJE+PKHGqUiV7REqZZ38b+AToXT1s94tFFde@mail.gmail.com>
To: "Eric A. Meyer" <eric@meyerweb.com>
Cc: www-style@w3.org
On Thu, Oct 28, 2010 at 7:29 AM, Eric A. Meyer <eric@meyerweb.com> wrote:
> Howdy all,
>
>   As I've been going through the various CSS3 modules, I've come to be
> rather frustrated by the enormous inconsistencies surrounding the 'initial'
> and 'inherit' keywords.
>   (And if this has come up before and been settled, then please direct me to
> the discussion and accept my apologies for needlessly re-raising it.  I
> searched the archives but didn't come up with anything.)
>   As things stand, http://dev.w3.org/csswg/css3-cascade/ and
> http://www.w3.org/TR/css3-values/ both say that all CSS3 properties accept"
> 'initial' and 'inherit'.  Okay, that sounds easy.  But then you hit:
>
>   * Modules which don't explicitly list either value in their property
> definitions but say somewhere (often, though not always, in the
> Introduction) that all properties accept both (for example,
> http://www.w3.org/TR/css3-linebox/).  This isn't very clear to readers of
> the specification.
>
>   * Modules which don't explicitly list either in their property definitions
> but say somewhere (often, though not always, in the Introduction) that all
> properties accept 'inherit' while not mentioning 'initial' (for example,
> http://www.w3.org/TR/css3-background/).  The implication is that 'initial'
> is not applied to properties in that module.
>
>   * Modules which make no statement about either 'initial' or 'inherit' AND
> don't reference http://dev.w3.org/csswg/css3-cascade/ nor
> http://www.w3.org/TR/css3-values/ (for example,
> http://www.w3.org/TR/css3-animations/ or http://www.w3.org/TR/css3-gcpm/).
>  Thus, formally speaking, those properties accept neither.
>
>   * Modules which make no statement nor refer to
> http://dev.w3.org/csswg/css3-cascade/ nor http://www.w3.org/TR/css3-values/
> but which explicitly define 'inherit' to apply to all defined properties
> (for example, http://www.w3.org/TR/css3-fonts/).  The implication is that
> 'initial' is not applied to properties in that module.
>
>   * Modules which make no statement nor refer to
> http://dev.w3.org/csswg/css3-cascade/ nor http://www.w3.org/TR/css3-values/
> but which explicitly define 'inherit' to apply to some, though not all,
> defined properties (for example, http://www.w3.org/TR/css3-box/ or
> http://www.w3.org/TR/css3-speech/).  The implication is that 'initial' is
> not applied to properties in that module and 'inherit' is not applied to
> some properties in that module.
>
> At no point did I find a module simply list BOTH 'initial' and 'inherit'
> explicitly in their property definitions, though I admit I didn't go through
> the low-priority modules.  The closest I got was modules like
> http://www.w3.org/TR/css3-fonts/ which consistently listed 'inherit' (but
> made no mention of 'initial').
>   And then there's http://www.w3.org/TR/css3-linebox/#drop-initial-value and
> http://www.w3.org/TR/css3-linebox/#inline-box-align, both of which appear to
> define a different 'initial' (or is it?) in their property definitions than
> the 'initial' which is applied to all properties per the text at the
> beginning of that module.
>   This last seems like a perfect illustration of the problem in not
> explicitly listing 'initial' and 'inherit' for all properties.  It's
> possible to forget that they apply, or to miss that fact altogether. Leaving
> them out isn't increasing clarity, it's increasing confusion. It looks like
> it's doing that for specification authors as well as page authors.  Possibly
> even for implementors.
>   My strong recommendation is that all properties simply explicitly list all
> value keywords they accept, whether or not they are "universal"  Thus, all
> properties should have " | initial | inherit" at the end of the value
> definition.  Or, if those keywords don't actually apply to all CSS3
> properties, then obviously they should be listed only on those properties
> that accept them and not on those that don't.  As things stand now, it's a
> huge mess and it's going to lead to interoperability problems at some point.
>  Explicitly listing all keywords would eliminate the confusion.

It is somewhat inconsistent, but CSS3 Values & Units makes the
definitive statement that all properties everywhere accept 'inherit'
and 'initial', and defines what that means.

~TJ
Received on Thursday, 28 October 2010 17:59:37 GMT

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