title: CSS matching predecessor
body: <p>Let's say I have a simple structure:</p>
  
  <pre><code>&lt;div id="a"&gt;&lt;/div&gt;
  &lt;div id="b"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>If <code>#b</code> has class <code>.test</code>, I want to set <code>#a { display: none; }</code>. Are there any css tricks to acomplish this? We can assume that they are the only childs of their parent.</p>