title: Is it possible to select body as a parent element?
body: <p>I need to style body tag differently based on another element’s class that is set dynamically on load. Is it possible to select body as a parent element of another element without using JS?</p>
  
  <p>Under condition #1 the page might look like this:</p>
  
  <pre><code>&lt;body&gt;
  …
      &lt;div class=”first-version”&gt;…&lt;/div&gt;
  …
  &lt;/body&gt;
  </code></pre>
  
  <p>Under condition #2 the page might look like this - different class on div:</p>
  
  <pre><code>&lt;body&gt;
  …
      &lt;div class=”second-version”&gt;…&lt;/div&gt;
  …
  &lt;/body&gt;
  </code></pre>
  
  <p>Pseudocode, this doesn’t work but gives you an idea what I’m trying to do (create a theme of sorts):</p>
  
  <pre><code>body[contains div.first-version] {
      margin:100px;
  }
  body[contains div.second-version] {
      margin:200px;
  }
  </code></pre>