RE: [css-variables] Different syntax for variable definition and use

> > To me, the best solution is still { var-foo: xyz; var-bar: get(var-foo||fallback); }
>
> The last thing on earth I want is CCSS: Cryptic Cascading
> StyleSheets. The above is cryptic. I disagree with the proposed
> change.

Thanks for your sincerity. However I have a hard time understanding how "cryptic" the syntax is, especially when you look at the overloaded use of the comma.

    selector {
        var-custom-bgs: url(a), url(b);
        background: var(custom-bgs, url(c), url(d));
    }

vs

    selector {
        var-custom-bgs: url(a), url(b);
        background: get(var-custom-bgs || url(a), url(b));
    }

The double pipe (||) is universally recognized as the 'or' symbol, and this is exactly what it will be used for as most of the times. The 'get' name is really doing just what it's saying it does: getting the value of 'var-custom-bgs' or using 'url(a), url(b)' as a fallback value.

It also solve the issue of this thread (which did come up often: that the same identifier should be used while getting and setting a variable). At the same time, it's not suffering of Tab's issue that it should be clear from the syntax that a variable cannot be used as a property name.

Anyway, I'm not going to enumerate all of the advantages here, I've a better idea than to keep this thread going on and on. I hate feeling stuck in a swamp and I agree with you this thread certainly looks like one. 		 	   		  

Received on Tuesday, 19 February 2013 21:33:50 UTC