[CSS Variables] WebKit now supports variable declaration blocks

In the next WebKit nightly you will be able to try out CSS variables  
whose values are declarations.  Here is what the syntax looks like:

@-webkit-variables {
    simpleVariable: 5px;
    complexVariable {
        width: 5em;
        height: 5em;
    }
}

div {
     background-color: green;
     -webkit-var(complexVariable);
     color: white;
}

As I stated in a previous post, WebKit also currently supports the  
double equals syntax and the dollar sign syntax for referencing  
variables, so =complexVariable= and $complexVariable also work.

dave
(hyatt@apple.com)

Received on Monday, 28 July 2008 22:57:17 UTC