nested-error-recovery.html (1105B)
1 <!DOCTYPE html> 2 <title>CSS Nesting: Error recovery</title> 3 <link rel="help" href="https://drafts.csswg.org/css-nesting-1"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 html { 8 z-index: 0; 9 10 error3234 {**** ::} 11 12 #test1 { 13 @media screen { 14 z-index: 1; 15 } 16 } 17 18 { whatever } 19 20 :doesntexist {z-index: 9;} 21 22 #test2 { 23 z-index: 2; 24 } 25 26 #test3 { 27 z-index: 3; 28 @media screen { 29 error3234; 30 { foo } 31 z-index:4; 32 } 33 { foo } 34 z-index: 5; 35 } 36 37 } 38 </style> 39 40 <div id=test1></div> 41 <div id=test2></div> 42 <div id=test3></div> 43 44 <script> 45 test(() => { 46 assert_equals(getComputedStyle(document.documentElement).zIndex, '0'); 47 }); 48 test(() => { 49 assert_equals(getComputedStyle(document.getElementById("test1")).zIndex, '1'); 50 }); 51 test(() => { 52 assert_equals(getComputedStyle(document.getElementById("test2")).zIndex, '2'); 53 }); 54 test(() => { 55 assert_equals(getComputedStyle(document.getElementById("test3")).zIndex, '5'); 56 }); 57 </script>