For a custom stylesheet (via Stylish) I want to apply a style to element A only if another element B has a certain attribute set:
<section>
<div id="some-element" class="optional-class">...</div>
</section>
...
<section>
<div id="concrete-element">...</div>
</section>
#concrete-element {
/* become pretty */
}
Now I want #concrete-element to become pretty only if #some-element has the .optional-class class attribute.
Is there any way I can solve this without JavaScript?