Files
sousa-gecko/testing/web-platform/tests/css/css-nesting/contextually-invalid-selectors-003.html
T
Romain Menke f012285c1a Bug 1967241 [wpt PR 52634] - Nesting selectors that refer to pseudo elements must not match the originating element, a=testonly
Automatic update from web-platform-tests
Nesting selectors that refer to pseudo elements must not match the originating element

--

wpt-commits: b4268a8bd2ee079f0f1da1d36c6c709a7366bb81
wpt-pr: 52634
2025-06-19 08:16:37 +00:00

34 lines
759 B
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>