Re: [cssom][css-display][css-cascade] revisiting "default display"

On Fri, Sep 6, 2013 at 10:27 AM, Simon Pieters <simonp@opera.com> wrote:

> On Fri, 06 Sep 2013 16:12:29 +0200, Mike Sherov <mike.sherov@gmail.com>
> wrote:
>
>  That's correct. That's why access to "default value" is valuable: it's not
>> influenced by authors. It's one of those cases where libraries and the UA
>> need to be able to circumvent authors shooting unknowingly shooting
>> themselves in the foot.
>>
>
> OK. Does anyone have an opinion about whether we should expose default
> value for all properties or just for 'display'?


For reference, there's already window.getDefaultComputedStyle(elem) in
Firefox implemented: http://jsfiddle.net/cBnzp/

However, there are unimplemented APIs in the CSSOM spec:
elem.cascadedStyle, elem.rawComputedStyle (which returns computed values
whereas window.getComputedStyle returns "resolved value"), and
elem.usedStyle

My personal recommendation would be:
1. add "default value" as a type of value to CSS3 Cascading and Inheritance
2. add "default" back in as a keyword value to section 7.3 of CSS3
Cascading and Inheritance
3. add elem.defaultStyle (which should do the same thing as
window.getDefaultComputedStyle(elem) currently does in FF) to CSSOM in
place of window.getDefaultComputedStyle(elem)



>
>
> --
> Simon Pieters
> Opera Software
>



-- 
Mike Sherov
Chief Technologist
SNAP Interactive, Inc. | Ticker: STVI
http://snap-interactive.com | http://ayi.com

Received on Friday, 6 September 2013 16:06:29 UTC