Using `:is()` in complex selectors selects more than you might initially think.
π bram.us/2023/01/17/using-is-β¦
π· #css #selectors
1
22
3
73
Why in the world would you use :is() in such a situation?
I cannot think of a single use case that would make me even consider using :is() like that.
1
I had seen it when I asked the question. I still don't see the logic behind ever using `.a :is(.b .c)` (unless what you really want is to catch the .b .a .c case too), whether you manually write it like that or it's generated from the way you nest things.
1
Maybe worth noting that .a :is(.b .c) matches a slightly larger set of things, since it matches everything matched by:
.a .b .c
.b .a .c
.a.b .c
Jan 18, 2023 Β· 2:11 PM UTC
1
3



