Applying hover to many elements at once

I thought we could do this with :where or :has but I can't seem to figure it out or find it online. If I have the following classes,
.btn__small{}
.btn__medium{}
.btn__large{}
.btn__small{}
.btn__medium{}
.btn__large{}
I want to do something like,
:where(.btn__small, .btn__medium, .btn__large):hover {}
:where(.btn__small, .btn__medium, .btn__large):hover {}
4 Replies
Joao
Joao•2y ago
I think it should be:
.btn__small,
.btn__medium,
.btn__large:where(:hover) {
/* rules */
}
.btn__small,
.btn__medium,
.btn__large:where(:hover) {
/* rules */
}
Mm, no just tried it and doesn't seem to work either Actually your example is working for me 🤔
NazCodeland
NazCodeland•2y ago
I think the :where only applies to btn__large in that case is it? no way -.- let me double check
NazCodeland
NazCodeland•2y ago
awesome, thank you @joao6246