inheritance.html (1856B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Inheritance of CSS Basic User Interface properties</title> 6 <link rel="help" href="https://drafts.csswg.org/css-ui/#property-index"> 7 <meta name="assert" content="Properties inherit or not according to the spec."> 8 <meta name="assert" content="Properties have initial values according to the spec."> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script src="/css/support/inheritance-testcommon.js"></script> 12 </head> 13 <body> 14 <div id="reference"></div> 15 <div id="container"> 16 <div id="target"></div> 17 </div> 18 <style> 19 #reference { 20 border-style: dotted; /* Avoid border-top-width computed style 0 */ 21 border-top-width: medium; 22 color: lime; 23 background: blue; 24 } 25 26 #container, #target { 27 outline-style: dotted; /* Avoid outline-width computed style 0 */ 28 color: lime; 29 background: blue; 30 } 31 </style> 32 <script> 33 const mediumWidth = getComputedStyle(reference).borderTopWidth; // e.g. 3px 34 const currentColor = getComputedStyle(reference).color; 35 36 assert_not_inherited('appearance', 'none', 'auto'); 37 assert_inherited('caret-color', currentColor, 'rgba(42, 53, 64, 0.75)'); 38 assert_inherited('caret-shape', 'auto', 'bar'); 39 assert_inherited('cursor', 'auto', 'pointer'); 40 assert_not_inherited('nav-down', 'auto', '#foo'); 41 assert_not_inherited('nav-left', 'auto', '#foo'); 42 assert_not_inherited('nav-right', 'auto', '#foo'); 43 assert_not_inherited('nav-up', 'auto', '#foo'); 44 assert_not_inherited('outline-color', currentColor, 'rgba(42, 53, 64, 0.75)'); 45 assert_not_inherited('outline-offset', '0px', '10px'); 46 assert_not_inherited('outline-style', 'none', 'auto'); 47 assert_not_inherited('outline-width', mediumWidth, '10px'); 48 assert_not_inherited('resize', 'none', 'vertical'); 49 assert_not_inherited('user-select', 'auto', 'none'); 50 </script> 51 </body> 52 </html>