W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [cssom] Proposing a getDefaultComputedStyle method

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 12 Oct 2012 12:21:15 -0700
Message-ID: <CAAWBYDAWFq0HXKR9XXCEa2-9C2HfiosEr4L8u9PM6hK1zrTViQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style list <www-style@w3.org>
On Fri, Oct 12, 2012 at 11:36 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Proposal: a getDefaultComputedStyle method that acts just like
> getComputedStyle but returns what the style would be if it were not for
> author rules.
> Rationale: jQuery has hacks to try to figure out default styles, involving
> creation of subframes and so forth.  These hacks are very fragile.  There's
> got to be a better way for libraries to do this sort of thing.

I'm slightly unsure of the use-case.  What does jQuery use this
information for?  Is it just for setting things back to their
pre-author state?

If so, I'd prefer we go ahead and add the previously-discussed
"default" global keyword which has this functionality.

Received on Friday, 12 October 2012 19:22:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:50:29 UTC