I've got a stepper component like this
Note the DOM is something like
<div class="my-stepper">
<button>-</button>
<input type='number' />
<button>+</button>
</div>
I was using .my-stepper:focus-within to ensure that the whole stepper looks focused when you're in the the input
But I don't like that when you focus a button, you end up with a doubled up focus
I was hoping to use something like .my-stepper:focus-within:not(button:focus) to ensure that if the focus is on the input, container should look focused, but if focus is on a button, the container should NOT look focused.
How can I get the effect I'm looking for without changing my DOM?



