Skip to content

Commit 6b7d920

Browse files
committed
[css-nesting-1] Add an example explicitly showing a complex selector in the parent rule. Fixes w3c#7969
1 parent dad6b60 commit 6b7d920

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

css-nesting-1/Overview.bs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,12 @@ Syntax {#syntax}
396396
:is(.error, #404):hover > .baz { color: red; }
397397
*/
398398

399+
.ancestor .el {
400+
.other-ancestor & { color: red; }
401+
}
402+
/* equivalent to
403+
.other-ancestor :is(.ancestor .el) { color: red; }
404+
399405
<b>/* As can the nested selector */</b>
400406
.foo {
401407
& :is(.bar, &.baz) { color: red; }

0 commit comments

Comments
 (0)