W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: Better Variables through Custom Properties

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Tue, 25 Oct 2011 07:36:44 +0200
Message-ID: <4EA64AEC.8020905@disruptive-innovations.com>
To: www-style@w3.org
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:06 UTC