title: How can I set a parent element’s style based on its child’s attributes in CSS?
body: <p>For example when input is disabled, parent element should have Black background otherwise White.</p>
  
  <pre><code>&lt;div&gt;&lt;input type="text" disabled="disabled" /&gt;&lt;/div&gt;
  
  div input[type="text", disabled="disabled"] {
      background: Black;
  }
  </code></pre>
  
  <p>I want to style parent element instead of child.</p>