Re: Better Variables through Custom Properties

Le 25/10/11 01:39, Tab Atkins Jr. a écrit :

> :root {
>    data-main-color: #06c;
>    data-accent-color: #006;
> }
> h1 {
>    color: data(main-color);
>    border-left: thick solid data(accent-color);
> }

Looks interesting, benefits from the existing OM, only uses
forever one prefix. Oh, and finally closes the ridiculous
mutable/non-mutable religious war that made zillions of us wait for
more years for variables in CSS. Mutable, period.

So in two words: *really cool*...

What's the value of a data-* property? A single token? Multiple
tokens ? Think practical for web authors, complexity is ours and
not their problem.

Can we avoid circular dependencies making it invalid to use data()
in the value(s) of a data-* property? I don't think we need it anyway.

</Daniel>

Received on Tuesday, 25 October 2011 05:37:17 UTC