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

Re: Better Variables through Custom Properties

From: Roland Steiner <rolandsteiner@google.com>
Date: Tue, 25 Oct 2011 10:50:31 -0700
Message-ID: <CACFPSpiUwq9wR9NRUR8tQR1g+4C5LZf7Q0xtM0-mUPDYAYaT+g@mail.gmail.com>
To: Brian Kardell <bkardell@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org
On Tue, Oct 25, 2011 at 10:41, Brian Kardell <bkardell@gmail.com> wrote:

> I take it from Tab's "similar to the data-* attributes in HTML" that
> these are not HTML data attributes and would not be exposed in a
> writable way via DOM/script?

No, but AFAICT there shouldn't be a reason to not make HTML data attributes
accessible via attr(), i.e.

[data-foo] {
  data-foo: attr(data-foo);

With this you could write to the HTML data attribute and the CSS variable
(same name not required) should pick it up.

- Roland
Received on Tuesday, 25 October 2011 17:51:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:34:59 UTC