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

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 UTC