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: Glenn Adams <glenn@skynav.com>
Date: Wed, 22 Aug 2012 04:08:23 +0800
Message-ID: <CACQ=j+eHCkQgiFtVo0uQL=4Viq8F8b_Qpa94bGK5WMip0aPqow@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style@w3.org
On Wed, Aug 22, 2012 at 2: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.

The rows were removed in an editing process that is not yet complete. I
have an action to restore them or represent in another fashion, e.g., by a
prose description or by a separate partial interface. I will add an issue
inline in the spec noting this TBD.

> 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.

I would recommend against this approach (having a CSS2Properties that
inherits from CSSStyleDeclaration). Instead, I would suggest we make use of
one or more partial interfaces to express the additional named property IDL
attributes. [Though I am open to different approaches, such as one that
uses a prose description rather than an IDL description.] One possible
reason to prefer a prose description is the need to have a spec that
accommodates future named property additions. Alternatively, we could
freeze the set of named properties (e.g., to only some or all of what was
defined in CSS2Properties), and require other properties to be accessed via
getPropertyValue etc.
Received on Tuesday, 21 August 2012 20:09:14 UTC

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