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

Re: "inherit"

From: Michael Day <mikeday@yeslogic.com>
Date: Tue, 29 Jul 2003 18:11:38 +1000 (EST)
To: Ian Hickson <ian@hixie.ch>
Cc: Tantek Çelik <tantek@cs.stanford.edu>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <Pine.LNX.4.44.0307291806410.18084-100000@lorien.yeslogic.com>

> I have often needed the feature in my own stylesheets, so this would
> certainly not only be for UA developers.

Resetting large numbers of properties to their default/initial values 
seems error prone, regardless of keyword usage, as the declarations would 
need to be updated every time you used a new property elsewhere in your 
style sheets. Why not just introduce a new shorthand property:

everything: normal | initial | default

Specifying "normal" will do nothing, specifying "initial" will reset every
property to its initial value, and specifying "default" will either
inherit or initialise every property, depending on whether it is usually

Then if you wanted to have say a frame in which style was reset to
defaults, but surrounded by navigation with custom styling, and inheriting
the color of its parent, it would be easy:

div.frame {
    everything: default;
    color: inherit

Only the everything property would take initial and default as values, as
that is where they can be used most effectively.

What do you think? :)

(This would also be *much* easier to implement).


YesLogic Prince prints XML!
Received on Tuesday, 29 July 2003 04:09:10 UTC

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