So, .search-chat-search-btn > form { }
targets the form "inside" the element with class .search-chat-search-btn
, but can I make it go the other way? As in, target the form that is outside .search-chat-search-btn
?
<form>
<button class="search-chat-search-btn"></button>
</form>
Apparently this is suppose to work, but it doesn't. Target every form that has a button.
form:has(> button) {
display: inline;
border: red 1px solid;
}
https://developer.mozilla.org/en-US/docs/Web/CSS/:has
(but then I just realised it's only supported in Safari, development version?)