<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>13283</bug_id>
          
          <creation_ts>2011-07-18 07:01:25 +0000</creation_ts>
          <short_desc>Current definition for [hidden] is not very useful for Web application developers.  Every style rules in the author style sheet have to contain :not([hidden]) in their selectors to not override &apos;display&apos; property for [hidden] elements.</short_desc>
          <delta_ts>2011-08-10 23:06:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#hidden-elements</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ayg</cc>
    
    <cc>ian</cc>
    
    <cc>jackalmage</cc>
    
    <cc>jonas</cc>
    
    <cc>laura.lee.carlson</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>51192</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-07-18 07:01:25 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/complete.html
Multipage: http://www.whatwg.org/C#hidden-elements
Complete: http://www.whatwg.org/c#hidden-elements

Comment:
Current definition for [hidden] is not very useful for Web application
developers.  Every style rules in the author style sheet have to contain
:not([hidden]) in their selectors to not override &apos;display&apos; property for
[hidden] elements.

Posted from: 58.138.63.189
User agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51231</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2011-07-18 17:59:37 +0000</bug_when>
    <thetext>Hmm, this is true.  Presentational attributes apply with lower precedence than any author CSS, which means it would be relatively easy to accidentally set the &apos;display&apos; on a hidden element to something other than &apos;none&apos;.

Perhaps we should define this as acting at a different specificity level.  It should be more specific than author styles, but less specific than author !important styles.  That leaves us with it being either between author and user, between user and @style, or between @style and author !important.  I don&apos;t know which one would be best.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51232</commentid>
    <comment_count>2</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-07-18 18:04:04 +0000</bug_when>
    <thetext>One way to specify it would be to say that the UA stylesheet contains a rule like:

*[hidden] {
  display: none !important;
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51233</commentid>
    <comment_count>3</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2011-07-18 18:18:35 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; One way to specify it would be to say that the UA stylesheet contains a rule
&gt; like:
&gt; 
&gt; *[hidden] {
&gt;   display: none !important;
&gt; }

Except that CSS doesn&apos;t officially recognize the notion of a UA !important rule for some reason.  Of course, all the browsers use that to some extent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52664</commentid>
    <comment_count>4</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:03:30 +0000</bug_when>
    <thetext>mass-moved component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54648</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-10 23:06:51 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: 

We definitely don&apos;t want to prevent authors from changing how hidden=&quot;&quot; is implemented at the CSS level. For example, I have in the past changed it to opacity:0 so that I can do animations on opacity using transitions. One could do similar things with other properties, e.g. height:0 to do a roll-up.

I do agree that it is rather annoying that every rule with &apos;display&apos; in it ends up wacking the default [hidden] rule. Not sure what we can do about it though. It&apos;s not really any different than the way you have to be careful about not blowing away the &apos;display&apos; property of &lt;table&gt; or the &apos;font&apos; property of &lt;h1&gt; or whatnot. I&apos;m skeptical about adding a new layer to the cascade; first the cascade is pretty complex already, and second it would be confusing to suddenly have this one feature that has to be overridden by !important.

If anyone has any other ideas, though, we should definitely consider them.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>