I have a situation where I need to change the text color of a label where the following sibling is an input, when its focussed.
div(class='form-control')
label(class='label ...')
input(type='text')
The best I can come up with is the move the label to AFTER the input, use the adjacent sibling selector input:focus + label
input:focus + label {
@apply text-green-500;
}
...and then reverse the order with flexbox flex-direction
... but it means I need to separate the styling into separate CSS file and putting the order 'backward' is highly annoying ...
Are there any tips, tricks or Tailwind utilities to support this use case?