implicit-nesting-ident.html (508B)
1 <!DOCTYPE html> 2 <title>CSS Nesting: Implicit nesting (ident)</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 #main { 8 div { 9 color: green; 10 } 11 } 12 </style> 13 <div id=main> 14 <div id=target> 15 Green 16 </div> 17 </main> 18 <script> 19 test(() => { 20 assert_equals(getComputedStyle(target).color, 'rgb(0, 128, 0)'); 21 }, 'Nested rule starting with tag'); 22 </script>