<p><pre><code>  is that if you&#x27;re relying on DOM structure (e.g. styling X if he is a descendant or sibling of Y), then you&#x27;re doing it wrong.
</code></pre>
Actually this is the way to do it without going overboard with it. Even UI frameworks like Boostrap or Foundation rely on this convention to style elements on the page.<p>Littering the HTML markup with classes all over the place for the illusion of &quot;loose coupling&quot; between the CSS and HTML is an anti-pattern and counter-productive.<p>You just need to use classes when appropriate and necessary and then rely on the inherent and predictable relations between HTML elements to supply styling information and close the deal.