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

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

From: Mike Sherov <mike.sherov@gmail.com>
Date: Fri, 6 Sep 2013 10:12:29 -0400
Message-ID: <CAD1Dv_KGvNC3wygxZ1F71rxp53zXvYLpQ4USFdG_g5BXLKsQrw@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Fri, Sep 6, 2013 at 8:44 AM, Simon Pieters <simonp@opera.com> wrote:

> On Fri, 06 Sep 2013 11:36:23 +0200, Mike Sherov <mike.sherov@gmail.com>
> wrote:
>  At risk of beating a dead horse, allow me to describe two use cases, and
>> how CSS Display Level 3 (and CSSOM and CSS Cascading) attempts to address
>> each one:
>> 1. A javascript library wants to be able to "hide" (set display:none) a
>> "non-hidden" (has a display other than none) element and then "show"
>> (return to the display value before setting it to none) it.  This is the
>> main use case covered by Display Module Level 3. By providing a separate
>> "box" property, a javascript library can set that property to "none" to
>> perform a "hide", and then set that property to "normal" to perform a
>> "show". No loss of information about whether the element was inline or
>> block. Great!
>> 2. A bit more insidiously, a javascript library wants to "show" a div that
>> is already "hidden" through an element selector in the author style sheet:
>> div {display:none;}. Can Display Level 3 address this? The current spec
>> says:
> The author style sheet could use box:none instead of display:none. But
> maybe that doesn't help you if you're writing a library and can't influence
> what the author puts in the style sheet?

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.

> --
> 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 14:13:17 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC