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

Re: [cssom] CSS Value API

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 22 Apr 2010 08:33:53 -0700
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Anne van Kesteren <annevk@opera.com>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <F788FB1C-ABE4-4E3D-9458-FA1D9B286026@gmail.com>
To: Ojan Vafai <ojan@chromium.org>

On Apr 21, 2010, at 3:30 PM, Ojan Vafai wrote:

> Also, I find the m and l accessors confusing. Can we just have a single accessor for all types, e.g. v for value? 
> 
> On Wed, Apr 21, 2010 at 3:22 PM, Ojan Vafai <ojan@chromium.org> wrote:
> 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 thought that was one of the points of this interface, was that you could convert anything to px by getting the ".px" of its property value. Are you saying that should not be the case when it is myElem.style? Or are automatic conversions between absolute units (inches, cm, px) OK?

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

Hopefully that would work, even if the .style version didn't. But I like the idea of converting as if there was a calc().




Received on Thursday, 22 April 2010 15:34:31 GMT

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