W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2014

Re: [whatwg] hidden attribute useless with display: flex?

From: David Bruant <bruant.d@gmail.com>
Date: Wed, 30 Apr 2014 11:36:19 +0200
Message-ID: <5360C413.5070003@gmail.com>
To: whatwg <whatwg@whatwg.org>
Ok, sorry, I was pissed off... The web platform triggers this sort of 
reactions sometimes :-)

Constructive proposal:
* a special value for the hidden attribute that forces the element to be 
hidden regardless of what the CSS or style attribute says for the 
display value.
Maybe `hidden="force"`?

This might break existing website which would use the "force" value, but 
since it had no special meaning currently and there is no good reason to 
use this value, I'd say the odds are very low.

Any implementor interested?

David

Le 29/04/2014 23:32, David Bruant a écrit :
> Hi,
>
> // CSS:
> div{
>   display: flex;
> }
>
> // HTML:
> <div hidden></div>
>
> Per spec, the div should be shown right? I imagine there is no way 
> back on that?
> Does it mean hidden only works when the default (UA stylesheet) 
> display value is kept? Does it mean hidden is completely useless when 
> trying to combine it with display:flex?
>
> What I'm trying to do is just that an element have display:flex and to 
> hide it with the hidden attribute when I don't need the element to be 
> shown. I guess my only option is changing style.display?
>
> Thanks,
>
> David
Received on Wednesday, 30 April 2014 09:42:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:28 UTC