Post

daniel petho
daniel petho@nonzeroexitcode·
this effect can be achieved using only css by combining the :has() and :not() pseudo-classes: `.menu:has(.item:hover) .item:not(:hover) { filter: blur(8px); }` which simply means: when a menu has a hovered item, blur every item inside it that isn't being hovered
English
12
8
318
18.1K
Adel Bucetta
Adel Bucetta@adelbucetta·
@nonzeroexitcode but the real question is what happens when you have nested menus with multiple hover states does this solution scale or do you need something more robust to handle complexity?
English
1
0
1
64
daniel petho
daniel petho@nonzeroexitcode·
@adelbucetta you would def need a more complex selector / css rule, or if it's too complex just handle it with js
English
0
0
0
27
Paylaş