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

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