Status: PASS | Duration: 7ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-nesting/contextually-invalid-selectors-003.html
<!doctype html> <meta charset="utf-8" /> <title> Contextually invalid selectors due to :is() should not match and have no specificity </title> <link rel="help" href="https://drafts.csswg.org/css-nesting/#nest-selector" /> <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=293230"> <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html" /> <style> div { color: green; background-color: currentColor; width: 100px; height: 100px; } p { color: initial; } div::before { & { /* `&` must not match the originating element */ color: red; } } </style> <p>Test passes if there is a filled green square.</p> <div></div>
/css/reference/ref-filled-green-100px-square-only.html
<!DOCTYPE html> <link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> <p>Test passes if there is a filled green square.</p> <div style="width:100px; height:100px; background:green;"></div>