title: How can I select all elements except a specific class and its descendants?
body: <p>Using CSS, how can I select all elements except a specific class and its descendants?</p>
  
  <p>For example, I want to select all elements except <code>.my-class</code> and its descendants in the code below. I tried <code>:not(.my-class *)</code> but it doesn't work. </p>
  
  <p>In my project there are many complicated global styles and it's hard to fix them all. So  I can't edit all these styles as @Michael_B has answered. I just want to do not apply these styles in <code>.my-class</code> and its descendants without making big changes.</p>
  
  <pre><code>&lt;div&gt;
    &lt;span&gt;a&lt;/span&gt;
    &lt;div&gt;
      &lt;span&gt;b&lt;/span&gt;
    &lt;/div&gt;
    &lt;div class="my-class"&gt;
      &lt;span&gt;c&lt;/span&gt;
      &lt;div&gt;
        &lt;span&gt;d&lt;/span&gt;
        &lt;div&gt;
          &lt;span&gt;e&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>