W3C home > Mailing lists > Public > www-style@w3.org > December 2008

Re: no-cascade proposition

From: Jordan Osete <jor@joozt.net>
Date: Sun, 14 Dec 2008 10:49:02 +0100
Message-ID: <4944D68E.9020103@joozt.net>
To: www-style@w3.org

No, not exactly what I meant.
I really meant, treat the element as if it was a root element *only* for
its inheritance model, not the cascade or whatever else. Ie: disable all
inheritance to the element.
If some property of the element has the value "inherit", just act *for
this property* as if the element had nothing to inherit from.
But child elements could of course inherit from this element.

This would only change the inheritance model, not the cascade, because
it would really be too complex (and probably impossible) to handle.

Reading http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit :

    If the 'inherit' value is set on the root element, the property is
assigned its initial value.

So i guess we could add something like that to this definition to
express exactly what i meant :

    If the 'inherit' value is set on the root element, [or if the
element's inheritance is disabled by means such as "disable-inheritance:
all;", ]the property is assigned its initial value.

Really, it should only affect inheritance.

Sylvain Galineau a écrit :
>> Well, I thought it could just do "as if" the given element was a root
>> element (had no parent), and thus considered to have nothing to inherit
>> from.
>>     
> So you could define arbitrary style roots anywhere in the document using CSS. What happens at the DOM level e.g. would a library such as jQuery be able to skip these 'embedded roots' without writing custom code for it ?
>
> I like the concept but explicit markup mechanisms are much better here imo.
>
>   
Received on Sunday, 14 December 2008 09:49:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:17 GMT