CSS previous sibling selectors and how to fake them

Facundo Corradini / filed under HTML & CSS

If you ever used CSS sibling selectors, you know there’s only two. The + sibling combinator selects the first match that comes immediately after, and the ~ subsequent-sibling combinator matches all the ones that come after. But there’s no way to select what came before. Either parent selectors or previous siblings selectors are simply not […]

Join thousands of product people and get the latest articles and resources from my curation every day or week.