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

Tab Atkins Jr. jackalmage at gmail.com
Tue Nov 13 14:18:30 PST 2012


On Tue, Nov 13, 2012 at 1:49 PM, Edward O'Connor <eoconnor at apple.com> wrote:
> 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.

As a further bit of info, the UA-important level is defined in the
Cascade module at <http://dev.w3.org/csswg/css3-cascade/#cascade>.
It's higher than everything except Transitions (and maybe Animations,
depending on the browser right now, but that'll settle down soonish).
This means that it's impossible for author-level code to override the
property, but I think that's what the correct and desirable behavior
is for this.

~TJ



More information about the whatwg mailing list