November 12, 2020
Today I learned :focus-within
Today I learned that there exists a CSS pseudo-class called :focus-within which we can use to match an element if the element itself or any of its descendants are matched by :focus. It is very helpful in cases when you want to highlight a container which also has few child elements and you want to keep it highlighted even if...