Re: [whatwg] hidden="" should be "display:none !important" in the UA stylesheet

On Tue, Nov 13, 2012 at 4:38 PM, Ian Hickson <ian@hixie.ch> wrote:

>  You just have to write .thing:not([hidden]), or have an explicit [hidden]
> rule. It's not a big deal.
>

This is a cumbersome, hackish workaround.  I shouldn't have to care about
whether an element might have its @hidden property set when I set an
element to inline-block, and I shouldn't need to hack up my CSS when I hide
an element.

The better solution would be for us to cascade the display type separately
> from the rendering tree inclusion/exclusion decision, but that boat sailed
> a long time ago.
>

Surely nothing prevents adding a CSS property, eg. "shown: no", which takes
precedence over display when set to "no" and does nothing when set to
"yes".  It's probably too late to change @hidden to use it, though maybe
not; it would probably break a roughly equal number of sites as the change
proposed here would.

-- 
Glenn Maynard

Received on Wednesday, 14 November 2012 01:56:20 UTC