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>
Hi,

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.


Ted
Received on Tuesday, 13 November 2012 22:03:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT