W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

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

From: Edward O'Connor <eoconnor@apple.com>
Date: Tue, 13 Nov 2012 13:49:32 -0800
To: whatwg@lists.whatwg.org
Message-id: <m2txst8977.fsf@eoconnor.apple.com>

I don't recall if this was in person or in email, but I think Tab made a
compelling argument in favor of changing the implementation of hidden=""
to be

  [hidden] {
    display: none !important;

in the UA stylesheet.

Consider a bunch of thingies, represented in the DOM with a pile of
<div>s. Some of them are hidden.

  <div id=thing0 class=thing>...</div>
  <div id=thing1 class=thing>...</div>
  <div id=thing46 class=thing>...</div>
  <div id=thing47 class=thing hidden>...</div>
  <div id=thing48 class=thing>...</div>
  <div id=thing84 class=thing>...</div>
  <div id=thing85 class=thing hidden>...</div>
  <div id=thing86 class=thing>...</div>
  <div id=thingN class=thing>...</div>

These thingies are flexboxes:

  .thing {
    display: flex;

As things stand now, all of the thingies are visible, including the ones
the author intended to remain hidden. This is really unfortunate.

Received on Tuesday, 13 November 2012 22:03:38 UTC

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