Re: What exactly is the replacement for getDefaultComputedStyle?

—
Sent from Mailbox





On Tue, Sep  2, 2014 at 08:24 PM, Tab Atkins Jr.<jackalmage@gmail.com>, wrote:
On Tue, Sep 2, 2014 at 3:57 PM, Mike Sherov <mike.sherov@gmail.com> wrote:

> I advocated for having this information as well about a year or so ago.

>

> What ended up happening is Tab said the CSS3 display module will fix this by

> making "display" a shorthand so that "none" could be specified without

> obliterating the display-inside and display-outside properties.

>

> That spec hasn't really moved at all, and devs, specifically us in jQuery

> world, still feel the pain of needing this hack every day.

>

> The reasons given to not pursue spec cing getDefaultComputedStyle at the

> time seemed to be (and forgive the paraphrasing):

>

> 1. It seems hard for browsers to accomplish this, having to do two cascades.

> (Although the irony of it being already implemented in FF makes this

> particularly sad).

>

> 2. "display" is broken, and getDefaultComputedStyle seems like a hack to fix

> that one property. (Although I'm not personally convinced how hacky it is.

> Knowing how a browser renders a property by default seems useful and

> straightforward).

>

> 3. The display problem "is a problem of the past, focus on the future" (even

> though the fix, CSS3 display, has basically stagnated with it's own

> non-insignificant amount of use cases to consider. Not to mention that it

> relies on the developer to "do the right thing" and use the new display

> values rather than giving jQuery the power to just do the right thing

> easily).


The spec hasn't stagnated; I've been working on it recently, it's

cleared to publish again, and I'm ready to stabilize it. 






​That's great news!

~TJ

Received on Wednesday, 3 September 2014 00:42:57 UTC