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

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

On Sep 7, 2013, at 3:21 PM, Simon Pieters <simonp@opera.com> wrote:

> On Sat, 07 Sep 2013 01:41:00 +0200, Mike Sherov <mike.sherov@gmail.com> wrote:
>
>> BTW, if you need another use case for this, it also solves the problem for
>> when someone tries to accidentally call .show() on an element that has
>> default "display:none", like a <input type=hidden>. You may think that's
>> non-sensical, but all an author has to do is $('form').children().show(),
>> and you're accidentally showing hidden inputs.
>
> That doesn't make the hidden inputs be rendered, though.
>
> [[
> The user agent is expected to force the 'display' property of input elements whose type attribute is in the Hidden state to compute to 'none', irrespective of CSS rules.
> ]]
> http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#hidden-elements

Oh, right. I was actually think of other tags like script, etc. but I
suppose those are all 1:1 mapped to tagname.
>
> --
> Simon Pieters
> Opera Software

Received on Saturday, 7 September 2013 19:39:46 UTC