I'm looking for a way to apply styling to the parent element of another element, using LESS/CSS.
For example:
HTML:
<div>
<span class="chosen">Hello World</span>
</div>
I need the CSS to apply styling to the element given the specific class of the child.
CSS:
div {
height: 50px;
background-color: 'blue'
}
Perhaps something like:
.chosen {
div& {
height: 50px;
background-color: 'blue'
}
}
Any direction greatly appreciated.
(Apologies for lack of fiddle, unsure how to include LESS)