W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [cssom] Proposal for obtaining robust style information via Javascript - getStyle()

From: Simon Pieters <simonp@opera.com>
Date: Wed, 08 May 2013 13:26:22 +0200
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>, "Mike Sherov" <mike.sherov@gmail.com>
Message-ID: <op.wwrjd8wmidj3kv@simons-macbook-pro.local>
On Tue, 07 May 2013 23:56:58 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

>> Thanks. However, the grid spec doesn't state use cases for getting used
>> value, as far as I can tell. If it is documented somewhere else, please  
>> give
>> a pointer.
>
> The use-case is figuring out how wide your tracks actually ended up,
> after the grid layout algorithm was run, so you can, for example,
> position abspos things around it, size canvases, etc.

OK.

>> That sounds reasonable, but I still want use cases stated for  
>> everything new
>> introduced so we don't end up specifying and implementing things that  
>> don't
>> get used.
>
> Well, people currently get value out of getComputedStyle(), and it
> only returns used styles for a handful of properties, returning
> computed for everything else, including those that are roughly similar
> to the legacy-used-value properties.  That suggests that computed
> values are valuable to authors.  If we're going to introduce some new
> getters in the style that dbaron suggests, it would be worthwhile to
> have computed styles align with that.

I've now added David's suggested API (except pseudoStyle() is called  
pseudo()) and changed getDefaultComputedStyle(element) to  
element.defaultStyle.

https://dvcs.w3.org/hg/csswg/rev/7e12087e6188

-- 
Simon Pieters
Opera Software
Received on Wednesday, 8 May 2013 11:26:56 UTC

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