WPT
wpt / css / selectors / has-basic.html
Spec: Selectors ↗
Runs: Chrome 155.0.8038.0 (wpt@b1a7025f8, 2026-09-02) | Firefox 157.0a1 (wpt@b1a7025f8, 2026-09-02) | Safari 251 preview (wpt@5ce815a83, 2026-08-27) | Ladybird 1.0-a7884 (wpt@b1a7025f8, 2026-09-02) | Servo Servo 0.5 (wpt@2ccd2cbf8, 2026-09-01) | Blitz 7727414ca (wpt@a95401e4e, 2026-09-02)
View on the Blitz WPT dashboard | Open test on wpt.live | wpt.fyi
| Chrome | Firefox | Safari | Ladybird | Servo | Blitz | |
|---|---|---|---|---|---|---|
| Total | 18/18 | 18/18 | 18/18 | 18/18 | 0/18 | 0/18 |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| :has(#a) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(.ancestor) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(.target) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(.descendant) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| .parent:has(.target) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(.sibling ~ .target) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| .parent:has(.sibling ~ .target) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(:is(.target ~ .sibling .descendant)) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| .parent:has(:is(.target ~ .sibling .descendant)) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| .sibling:has(.descendant) ~ .target matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(> .parent) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(> .target) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(> .parent, > .target) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(+ #h) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| .parent:has(~ #h) matches expected elements | PASS | PASS | PASS | PASS | FAIL | FAIL |
| .sibling:has(.descendant) matches expected element | PASS | PASS | PASS | PASS | FAIL | FAIL |
| closest(.ancestor:has(.descendant)) returns expected element | PASS | PASS | PASS | PASS | FAIL | FAIL |
| :has(.target ~ .sibling .descendant) matches expectedly | PASS | PASS | PASS | PASS | FAIL | FAIL |