nest-containing-forgiving.html (752B)
1 <!DOCTYPE html> 2 <title>Nest-containing in forgiving parsing</title> 3 <link rel="author" title="Steinar H. Gunderson" href="mailto:sesse@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-nesting-1/"> 5 <link rel="match" href="nest-containing-forgiving-ref.html"> 6 <style> 7 .test { 8 background-color: red; 9 width: 100px; 10 height: 100px; 11 display: grid; 12 } 13 14 .does-not-exist { 15 :is(.test-1, !&) { 16 background-color: green; 17 } 18 } 19 20 .does-not-exist { 21 :is(.test-2, :unknown(div,&)) { 22 background-color: green; 23 } 24 } 25 26 body * + * { 27 margin-top: 8px; 28 } 29 </style> 30 <body> 31 <p>Tests pass if <strong>block is green</strong></p> 32 <div class="test test-1"></div> 33 <div class="test test-2"></div> 34 </body>