I know TailwindCSS have class group
to use but that is only use for change styles of child element when the parent element activate some event, but I want it in vise versa.
<div class="parent"> <!-- border color should be red when child is focused -->
<img class="icon">
<input class="child" type="text">
</div>
And I don't want to re-write css classes. Just use TailwindCSS.
:focus-within
pseudo-class. – Bonneau