Re: "inherit"

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;

...or:

   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;

...vs:

   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