Support for :is is inconsistent
stof opened this issue · comments
Christophe Coevoet commented
:is(a, button).js-button-state
is inferred as HTMLAnchorElement|HTMLButtonElement
as expected. However, swapping the 2 selectors as .js-button-state:is(a, button)
does not infer them that way but as Element
.
Christophe Coevoet commented
My guess is that it tries to expand that as .js-button-statea, .js-button-statebutton
when expanding the :is
function, which is broken
Christophe Coevoet commented
@g-plane thanks for the quick fix. That's great (even though it was not blocking me as I went with the swapped selectors)