I have a fairly specific scenario where I'd like to remove a top-margin from an element named 'footer' if and only if I can determine the presence of another element in the DOM.
The other element happens to be a DIV with a colored background, in which case the margin applied to the footer creates an unwanted empty white space.
The other element is not a sibling of the footer, but is rather a fairly deep descendent of a a preceeding element in the DOM.
An example would be :
<main>
<section>
<wrapper>
<div id="if-exists-remove-footer-styling">
<div>
</wrapper>
</section>
</main>