Re: [css-variables] Cycling between values with variables

It's to be noted that it's exactly the kind of things the 
"child-align-outside" property of [css3-position] is doing.

    myFlexBox { child-align-outside: center; }

===

    myFlexBox { var-child-align-outside: center; }
    * { align-outside: var-inherit(child-align-outside); 
var-child-align-outside: auto; }


Regards,
François




-----Message d'origine----- 
From: Tab Atkins Jr.
Sent: Tuesday, May 15, 2012 2:38 AM
To: www-style list
Subject: Re: [css-variables] Cycling between values with variables

On Mon, May 14, 2012 at 5:15 PM, Tab Atkins Jr. <jackalmage@gmail.com> 
wrote:
> comment comment {
>  var-background: var(background2);
>  var-background2: var(background);
> }

Argh, Luke pointed out that the above is just a dependency cycle,
since they're each referring to the *current* value of the other var,
not the inherited value.

Screw it, I'm adding the var-inherit() function.  It enables several
other cool use-cases anyway.

~TJ 

Received on Tuesday, 15 May 2012 09:21:08 UTC