W3C home > Mailing lists > Public > www-style@w3.org > May 2012

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

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Tue, 15 May 2012 11:20:34 +0200
Message-ID: <5C2E0B924F0242B7B3CF841E9B1B9038@FREMYD2>
To: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style list" <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT