Re: [CSS Variables] WebKit now supports variable declaration blocks

http://trac.webkit.org/browser/trunk/LayoutTests/fast/css/variables/block-cycle-test.html

If a cycle is detected during variable resolution, you just ignore the  
spot that attempts to introduce the cycle.  Therefore the color would  
be red.

$another-complex-variable adds in maroon and then includes $complex- 
variable.  It adds in color:red... the attempt to include $another- 
complex-variable again is ignored because it would create a cycle.

dave
(hyatt@apple.com)

On Jul 31, 2008, at 11:40 AM, Andrew Fedoniouk wrote:

> Brad Kemper wrote:
>> I don't have a problem with a change to the core syntax, if it is a  
>> change that makes sense. But if it does matter, we could go with  
>> something more conforming, like this:
>> div {
>>  background-color: blue;
>>  var-group: $complex-variable;
>>  color:white;
>> }
>> Not sure we need the dollar sign there any more though with that.
>
> Say, I have:
>
> @define
> {
>    complex-variable:
>    {
>        color:red;
>        var-group: $another-complex-variable;
>    }
>    another-complex-variable:
>    {
>        color:maroon;
>        var-group: $complex-variable;
>    }
> }
>
> div
> {
>   color:white;
>   background-color: blue;
>   var-group: $complex-variable;
> }
> div
> {
>   color:blue;
>   var-group: $another-complex-variable;
> }
>
>
> What would be a color of the div text at the end:
>
> <div>
>  What color is this?
> </div>
>
>
> -- 
> Andrew Fedoniouk.
>
> http://terrainformatica.com

Received on Thursday, 31 July 2008 17:10:40 UTC