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

Re: [cssom] CSS Value API

From: Erik Arvidsson <arv@chromium.org>
Date: Wed, 21 Apr 2010 15:48:13 -0700
Message-ID: <p2o34df39071004211548qb160eaddyf528d896a26b3934@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Anne van Kesteren <annevk@opera.com>, "www-style@w3.org" <www-style@w3.org>
On Wed, Apr 21, 2010 at 15:22, Ojan Vafai <ojan@chromium.org> wrote:
> 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.

I think the important point here is to not resolve the style when
getting element.style. That would make element.style seemingly behave
like computed style in certain cases.

--
erik
Received on Wednesday, 21 April 2010 22:49:11 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:45 UTC