WPT
wpt / css / css-values / attr-security-if.html
Spec: CSS Values ↗
Runs: Chrome 155.0.8041.0 (wpt@4a01b83e3, 2026-09-04) | Firefox 157.0a1 (wpt@e7122b73f, 2026-09-04) | Safari 251 preview (wpt@2c385f65e, 2026-09-04) | Ladybird 1.0-70fb3 (wpt@4a01b83e3, 2026-09-04) | Servo Servo 0.6 (wpt@2c385f65e, 2026-09-04) | Blitz a50cb8971 (wpt@a95401e4e, 2026-09-03)
View on the Blitz WPT dashboard | Open test on wpt.live | wpt.fyi
| Chrome | Firefox | Safari | Ladybird | Servo | Blitz | |
|---|---|---|---|---|---|---|
| Total | 14/14 | 11/14 | 14/14 | 11/14 | 11/14 | 11/14 |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| '--x: image-set(if(style(--true): attr(data-foo);))' with data-foo="https://does-not-exist.test/404.png" | PASS | FAIL | PASS | FAIL | FAIL | FAIL |
| 'background-image: image-set(if(style(--true): attr(data-foo);))' with data-foo="https://does-not-exist.test/404.png" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set( if(style(--true): url(https://does-not-exist-2.test/404.png); else: attr(data-foo);))' with data-foo="https://does-not-exist-2.test/404.png" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set( if(style(--some-string): url(https://does-not-exist.test/404.png);))' with data-foo="https://does-not-exist.test/404.png" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set( if(style(--condition-val: attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set( if(style(--condition-val: attr(data-foo type(*))): url(https://does-not-exist.test/404.png); style(--true): url(https://does-not-exist.test/404.png); else: url(https://does-not-exist.test/404.png);))' with data-foo="1" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set(if(style(--true): url(https://does-not-exist.test/404.png); style(--condition-val): url(https://does-not-exist.test/404.png); else: url(https://does-not-exist.test/404.png);))' with data-foo="attr(data-foo type(*))" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set( if(style(--condition-val: if(style(--true): attr(data-foo type(*));)): url(https://does-not-exist.test/404.png);))' with data-foo="3" | PASS | PASS | PASS | PASS | PASS | PASS |
| '--x: image-set(if(style(--condition-val: if(style(--true): attr(data-foo type(*));)): url(https://does-not-exist.test/404.png);))' with data-foo="3" | PASS | FAIL | PASS | FAIL | FAIL | FAIL |
| '--x: image-set(if(style(--condition-val >= attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" | PASS | FAIL | PASS | FAIL | FAIL | FAIL |
| 'background-image: image-set( if(style(--condition-val >= attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set( if(style(--condition-val < attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set( if(style(--str < attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" | PASS | PASS | PASS | PASS | PASS | PASS |
| 'background-image: image-set( if(style(--condition-val < attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="text" | PASS | PASS | PASS | PASS | PASS | PASS |