title: How do I disable form fields using CSS?
body: <p>Is it possible to disable form fields using CSS? I of course know about the attribute disabled, but is it possible to specify this in a CSS rule? Something like -</p>
  
  <pre><code>&lt;input type="text" name="username" value="admin" &gt;
  &lt;style type="text/css"&gt;
    input[name=username] {
      disabled: true; /* Does not work */
    }
  &lt;/style&gt;
  </code></pre>
  
  <p>The reason I'm asking is that, I have an application where the form fields are autogenerated, and fields are hidden/shown based on some rules (which run in Javascript). Now I want to extend it to support disabling/enabling fields, but the way the rules are written to directly manipulate the style properties of the form fields. So now I have to extend the rule engine to change attributes as well as style of form fields and somehow it seems less than ideal.</p>
  
  <p>It's very curious that you have visible and display properties in CSS but not enable/disable. Is there anything like it in the still-under-works HTML5 standard, or even something non-standard (browser specific)?</p>