W3C home > Mailing lists > Public > www-style@w3.org > July 2003

Re: "inherit"

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 29 Jul 2003 00:52:14 -0700 (PDT)
To: Michael Day <mikeday@yeslogic.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <Pine.LNX.4.56.0307290030190.30489@dhalsim.dreamhost.com>

On Tue, 29 Jul 2003, Michael Day wrote:
>> 'default' was a proposal that would be like 'inherit' on inherited
>> properties and like 'initial' on non-inherited ones.
> Can that not be a recommendation? I would hate to have to explain the
> difference between these:
>     font-weight: normal
>     font-weight: initial
>     font-weight: inherit
>     font-weight: default
> Keyword overload

Not really. You could just as easily say:

   background: repeat;
   background: none;
   background: transparent;
   background: top;

   "keyword overload"

...as they all do the same thing. In practice, it doesn't really matter to
the authors how many keywords can be used, since they will only use the
ones they want.

The 'initial' keyword is useful because it means you can reset properties
without worrying about what the property actually is. Similarly with
'default', if it is introduced.

Which is simpler:

   left: 0;
   border-collapse: separate;
   caption-side: top;
   clear: none;
   clip: auto;
   content: normal;
   display: inline;


   left: initial;
   border-collapse: initial;
   caption-side: initial;
   clear: initial;
   clip: initial;
   content: initial;
   display: initial;

Which conveys the intention more clearly?

> and the "default" in particular has a distinctly unhelpful meaning.

Like I said earlier, 'default' is only a proposal. However, the concept of
a keyword that automatically picks the appropriate keyword (initial vs
inherit) is, IMHO, a good idea, for a similar reason to the above:

   font: inherit;
   background: initial;
   list-style: inherit;
   border: initial;


   font: default;
   background: default;
   border: default;
   list-style: default;

The second is less likely to have errors.

Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 29 July 2003 03:50:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:08 UTC