Re: [cssom] CSS Value API

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