Don’t comma-separate :focus-within if you need deep browser support

1 · CSS-Tricks · July 24, 2019, 7:15 p.m.
I really like :focus-within. It's a super useful selector that allows you to essentially select a parent element when any of its children are in focus. Say you wanted to reveal some extra stuff when a <div> is hovered... div:hover { .extra-stuff { /* reveal it */ } } That's not particularly keyboard-friendly. But if something in .extra-stuff is tab-able anyway (meaning it can be focused), that means you could write it like this to make it a bit … Read article The post Don’t comma-sep...