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

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

From: David Bruant <bruant.d@gmail.com>
Date: Thu, 01 May 2014 18:53:58 +0200
Message-ID: <53627C26.6060707@gmail.com>
To: Ian Hickson <ian@hixie.ch>, Anne van Kesteren <annevk@annevk.nl>, Robin Berjon <robin@w3.org>, Glenn Maynard <glenn@zewt.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: whatwg <whatwg@whatwg.org>
Le 30/04/2014 23:32, Ian Hickson a écrit :
>>> 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?
> Just add "[hidden] { display: none }" to your style sheet.
Hmm... interesting. And that works because my stylesheet is the author 
stylesheet which takes precedence over the UA stylesheet.

Is there a scenario where CSS specificity leads to this rule being ignored?
If the answer is no, I'm sold. It's not any worse than *{box-sizing: 
border-box} which I do all the time.

Received on Thursday, 1 May 2014 17:09:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:20 UTC