appearance-initial-value-001.html (1073B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Basic User Interface Test: appearance and -webkit-appearance</title> 4 <link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching"> 5 <meta name="assert" content="The appearance and -webkit-appearance properties are supported."> 6 <meta name="assert" content="Initial value is none."> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <style> 10 #appearance { appearance: button; } 11 #-webkit-appearance { -webkit-appearance: button; } 12 </style> 13 <div id="appearance"></div> 14 <div id="-webkit-appearance"></div> 15 <div id="initial"></div> 16 <script> 17 for (const prop of ['appearance', '-webkit-appearance']) { 18 test(() => { 19 const actual = getComputedStyle(document.getElementById(prop)).getPropertyValue(prop); 20 assert_equals(actual, 'button'); 21 }, `support for ${prop}`); 22 23 test(() => { 24 const actual = getComputedStyle(document.getElementById('initial')).getPropertyValue(prop); 25 assert_equals(actual, 'none'); 26 }, `initial value for ${prop}`); 27 } 28 </script>