W3C home > Mailing lists > Public > www-style@w3.org > September 2014

Re: What exactly is the replacement for getDefaultComputedStyle?

From: Simon Pieters <simonp@opera.com>
Date: Wed, 03 Sep 2014 07:46:07 +0200
To: "www-style list" <www-style@w3.org>, "Boris Zbarsky" <bzbarsky@mit.edu>
Message-ID: <op.xlljm5xwidj3kv@simons-mbp>
On Tue, 02 Sep 2014 23:07:26 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> At one point we agreed to add Element.getDefaultComputedStyle to CSSOM  
> to address the "what is the default (user+ua) value for this element for  
> a given CSS property?" use case.
>
> It looks like it's been removed from CSSOM at some point, but I see  
> nothing replacing it.  Certainly none of the things on  
> http://dev.w3.org/csswg/cssom/#getstyleutils cover this use case.  Am I  
> just missing something?
>
> The lack of such an API is causing libraries like jQuery to rely on  
> weird display:none iframe hacks in an attempt to gather this sort of  
> information.  And even with those hacks, if user/UA stylesheets have  
> media query dependent styles there's no way for them to get correct  
> answers.

http://lists.w3.org/Archives/Public/www-style/2013Aug/0161.html
http://lists.w3.org/Archives/Public/www-style/2013Aug/0164.html
https://dvcs.w3.org/hg/csswg/rev/3b8ded576b8a

Is there interest in implementing box:none to satisfy the use case?

-- 
Simon Pieters
Opera Software
Received on Wednesday, 3 September 2014 05:46:39 UTC

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