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

Re: [cssom] Supporting JS properties whose names are CSS property names on CSSDeclaration objects

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 15 Feb 2012 14:55:07 -0800
Message-ID: <CAAWBYDC4iEU1vyD6Pc0kxJtcESEmJ2FnGv8CUd2hZ_DYC_RhUA@mail.gmail.com>
To: Glenn Adams <glenn@skynav.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On Wed, Feb 15, 2012 at 2:37 PM, Glenn Adams <glenn@skynav.com> wrote:
> OK, just to be clear, your concerns regarding the CSSOM spec are that it
> should either:
> (1) explicitly define support for use of the bracket notation for property
> accessors for properties whose name is a style property defined by
> CSSStyleDeclaration
> or
> (2) explicitly exclude such support
> Is this correct? Do you have a preference?

No, I think you're misunderstanding.

Currently, the CSSOM defines that CSSStyleDeclaration has a property
named "fontSize".  WebKit and IE, though, additionally recognize a
property named "font-size", which is treated as an alias.  Same
applies to every other property with a dash in its name.

There's no need to talk about "bracket notation" because that's a
particular way that JS accesses properties on an object, and
irrelevant to the OM.  The issue is about the property names we expose
on the object.

> Regarding cssFloat vs float, are you suggesting that the spec should
> explicitly exclude the use of float, or merely add an informative note
> reminding the implementer/user that the correct name is cssFloat and not
> float?

Same thing.  We need to either get WebKit and IE to change their
implementation to expose only the specced property name ("cssFloat"),
or change the spec to mandate additionally exposing the "float"
property name, treated as an alias.

Received on Wednesday, 15 February 2012 22:55:57 UTC

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