Rebuilt our filter UI last week. Used to be a pile of JS toggling a .is-filtered-out class on every product card whenever you ticked a sidebar checkbox. Ripped all of it out for one nested :has() selector sitting on the grid container. Worked on the first try in Chrome. Felt like cheating, honestly.
Then QA got their hands on it. Safari 17 does support :has(), but the re-evaluation when you toggle a descendant is rough. I'm seeing 200ms+ of jank on a 60-item grid, every single checkbox click. Chrome doesn't blink. Firefox is fine. Safari just chugs like it's recomputing the whole tree.
So now I'm back to a hybrid mess: :has() for the initial paint, then a sprinkle of JS for the toggle path. Which is probably the worst of both worlds and my senior dev is gonna side-eye it in review.
Curious if anyone else has hit the re-eval cost. My selector was 4 levels deep, which I know is asking for trouble. Happy to be told I'm being an idiot here.