W3C home > Mailing lists > Public > www-style@w3.org > April 2010

Re: [cssom] CSS Value API

From: Ojan Vafai <ojan@chromium.org>
Date: Wed, 21 Apr 2010 15:22:55 -0700
Message-ID: <u2w78dc8441004211522nf14a0d01paa42606de62188a@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Anne van Kesteren <annevk@opera.com>, "www-style@w3.org" <www-style@w3.org>
On Wed, Apr 7, 2010 at 6:34 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 4/7/10 5:08 AM, Anne van Kesteren wrote:
>
>> And throws if the "wrong" one is accessed?
>>>
>>
>> I think when it can be converted we should allow for that.
>>
>
> OK.


What are cases where it can be converted? Are you thinking something like
converting em to px? I don't think we should transparently do conversions
like this. It would make sense if you had something like
element.computedStyle.margin.l[0].px, but for declared styles it seems like
we should throw. If we do decide to convert, there should at least be a
simple way to check if the value is set in px, em, whatever without
resorting to string parsing.

Ojan
Received on Wednesday, 21 April 2010 22:24:14 GMT

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