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

Re: [cssom] .style on CSSFontFaceRule and CSSPageRule should probably not be CSSStyleDeclarations as that interface is currently defined

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 21 Aug 2012 11:21:43 -0700
Message-ID: <CAAWBYDBSvxOtmh1sZuYPvEttkNFjrxCTBS8NhjXkhb8t1NnqCA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style@w3.org
On Tue, Aug 21, 2012 at 11:13 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 8/21/12 9:47 AM, Stewart Brodie wrote:
>> Was any progress ever made with this?
>
> At this point CSSStyleDeclaration no longer lists all the properties in the
> IDL and instead says:
>
>   Similarly for the table below, setting the IDL attribute in the first
>   column must invoke setProperty() with as first argument the CSS
>   property given in the second column on the same row, as second
>   argument the given value, and no third argument.
>
> The table has no rows, though, so the whole thing is a no-op.
>
> While this does address some of my comments, in that it effectively removes
> all those properties from CSSStyleDeclaration, I'm pretty sure the result is
> not web-compatible, since the properties _do_ need to be there for at the
> very least HTMLElement.style.
>
> In the meantime, in Gecko I'm implementing a CSS2Properties that has all the
> actual CSS properties, inheriting from CSSStyleDeclaration.  Then some
> things are CSS2Properties (e.g. HTMLElement.style) and some are just
> CSSStyleDeclaration (font-face descriptor stuff) for the moment. It's still
> all pretty broken, but it's _something_, at least.

Actually, that seems about right.  Having a common Declaration
interface for the things that use that seems useful, and then
subclassing the interface for each individual use lets you specialize
the list of exposed properties.

FWIW, @counter-style just copy-pasted @font-face's IDL, so it
currently has the exact same problem.

~TJ
Received on Tuesday, 21 August 2012 18:22:30 GMT

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