W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [css-variables] How to spec the OM for vars?

From: Ojan Vafai <ojan@chromium.org>
Date: Thu, 23 Aug 2012 18:45:13 -0700
Message-ID: <CANMdWTsBgAD22cAmkJerg6AOoXSbs9Lsj48En+uOKYTCTfG+Uw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
What are the use-cases for exposing this on style addresses? Seriously, I'm
not just trolling. I suppose if you're using variables to create custom
properties that you then implement in JS it could be useful?

On Thu, Aug 23, 2012 at 5:46 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> One of the remaining issues for Variables is what to expose in the OM, and
> how.
> Ideally, custom properties would just be exposed alongside all the
> other properties, so you could do "el.style.varFoo = 'bar';" or "x =
> getComputedStyle(el).varFoo;".
> This seems somewhat incompatible with how WebIDL works.  Right now,
> all the CSS properties are just exposed on CSSStyleDeclaration as a
> bunch of properties.  (If we were doing things properly, we'd do this
> by having every spec define a partial interface on it and add their
> properties.)
> However, there are an infinite number of custom properties.  I think
> we want to expose only the custom properties that are valid (set to a
> non-initial value).
> How can we do this in WebIDL?
> ~TJ
Received on Friday, 24 August 2012 01:46:02 UTC

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