Re: What exactly is the replacement for getDefaultComputedStyle?

On 9/2/14, 6:57 PM, Mike Sherov wrote:
> 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.

Yeah, that doesn't help things at all.

> 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).

Indeed.  getDefaultComputedStyle is _slower_ than getComputedStyle, but 
that seems ok.

> 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).

That's my feeling on it too.

I think we should reintroduce some way of getting the default computed 
style for an element.

-Boris

Received on Wednesday, 3 September 2014 01:57:33 UTC