I need to create a selector that can target the element zzz when a button is pressed in the input.
<label>
<input type="radio" name="hideshow">
<h1>{{heading}}</h1>
</label>
<zzz class="hideable">
Content that will be displayed when the button is pressed.
</zzz>
After trying to use the :has
selector without success, I discovered that it is disabled for CSS due to performance issues and can only be used in JavaScript.
Is there another way to achieve this functionality? I feel like there must be a simple solution that I am overlooking.