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

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

From: Glenn Adams <glenn@skynav.com>
Date: Fri, 24 Aug 2012 14:24:59 +0800
Message-ID: <CACQ=j+ex_+z4xHNhFUn5bE3NJX-gN5Ob4V8uNVrRNLLBvqx4iw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style@w3.org
On Fri, Aug 24, 2012 at 1:21 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 8/23/12 9:57 PM, Boris Zbarsky wrote:
>> On 8/23/12 6:33 PM, Glenn Adams wrote:
>>> My current thinking is to *only* define getter/setter and have it cover
>>> the existing CSS2Properties etc rather than define new partial
>>> interfaces ad infinitum.
>> As I said in my reply to Tab, I'm somewhat opposed to that.
>> Note also that if you do it that way page script won't be able to hook
>> the getters and setters for CSS properties, which is also not that great.
> And another problem: the change would not be backwards-compatible.  If you
> moved the existing attributes to a "getter" setup and a web page had this:
>   Object.prototype.display = 5;
> then suddenly .style.display would stop working, whereas right now it
> works in that situation in all browsers.
> I, personally, am not willing to take web compat risks like that in Gecko,
> especially when I don't see much of an upside.

how about a hybrid approach? e.g., define the current set of CSS2.1
properties found in CSS2Properties as individual attributes, and use g/s
for other properties; btw, i also notice that some browsers have a practice
of leaving undefined those CSS2Properties they don't support semantically
(e.g., FF doesn't define any of the aural props as IDL attributes on
CSSStyleDeclaration [1])

Received on Friday, 24 August 2012 06:36:30 UTC

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