Re: [css-syntax, ideas-needed] Merge/inherit lists of values.

On Tuesday 2012-04-10 14:44 -0700, Andrew Fedoniouk wrote:
> used value of background-image-transformation will be this:
> 
>    background-image-transformation: gamma(1.4) flip-x();
> 
> I suspect that for implementation of such inheritance some change on
> CSS grammar/syntax level is required.
> 
> I am thinking about something like !inherit modifier:
> 
> div:dir(rtl) {
>    background-image-transformation: flip-x() !inherit;
> }

But this isn't about inheritance at all: this is about handling of
multiple rules applying to the same element (cascading) rather than
propagation of computed values from ancestor to descendant
(inheritance).

We've previously discussed this sort of thing a few times under the
name "additive cascade", though never really come to any conclusion.

> I suspect that such inheritance feature could be useful for any other
> properties that accept lists of values. For example 'background'
> property that accepts lists of image definitions. In some cases
> it could be useful to combine two or more such list rather than
> to just override by heaviest rule.

Also counter-* and a few other things.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Tuesday, 10 April 2012 21:55:46 UTC