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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 24 Aug 2012 10:12:12 -0700
Message-ID: <CAAWBYDARG1KQaf53Xa3_xkGeoLhYiJa=C6fctSYPKjgVyrY9NA@mail.gmail.com>
To: Glenn Adams <glenn@skynav.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org
On Thu, Aug 23, 2012 at 10:04 PM, Glenn Adams <glenn@skynav.com> wrote:
> On Fri, Aug 24, 2012 at 12:55 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>
>> On 8/23/12 6:22 PM, Tab Atkins Jr. wrote:
>>>
>>> That works nicely with the existing attributes, I assume?  Or do I
>>> need to write the getter/setter to handle them as well?
>>
>> So my personal preference would be to use the IDL "getter" and "setter"
>> syntax for vars only and use normal IDL attributes for actual properties.
>
>
> My concern on this is that it will be a rather never-ending spec maintenance
> problem, requiring new partial interfaces on a regular basis (i.e., every
> time new CSS props are introduced or changed).

This is fine.  Each spec that adds new properties just puts a little
IDL section with this in it:

partial interface CSSStyleDeclaration {
  attribute DOMString? newProperty;
}
Amend the table at ... to contain the following additional rows:
| newProperty | new-property |

It's pretty trivial.


An alternative is just to hack around WebIDL here, and simply state
that the interface has a number of additional attributes of this form,
which map (as specified) to the CSS property obtained by transforming
the name by <specify camelCase to dash-separated>.

~TJ
Received on Friday, 24 August 2012 17:13:01 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT