Free CSS :has() Selector Generator

Create CSS parent selector patterns with our free tool. The :has() pseudo-class made easy.

Frequently Asked Questions

What can :has() do?

:has() selects elements that contain matching descendants. 'div:has(img)' selects divs containing images. It's essentially a parent selector we've wanted for 20+ years.

Is :has() performant?

Browser vendors optimized :has() before release. Avoid overly complex selectors, but normal usage is performant. Browsers limit certain combinations to prevent performance issues.

What browsers support :has()?

:has() is supported in Chrome 105+, Safari 15.4+, and Firefox 121+. It's safe to use with progressive enhancement for older browsers.