resolved-border-width.html (835B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <link rel="help" href="https://drafts.csswg.org/cssom-1/#resolved-values"> 4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> 5 <title>border-*-width returns computed rather than used values from getComputedStyle()</title> 6 <script src=/resources/testharness.js></script> 7 <script src=/resources/testharnessreport.js></script> 8 <input type=checkbox style="border: 5px solid red"> 9 <input type=radio style="border: 5px solid red"> 10 <script> 11 for (let input of document.querySelectorAll("input")) { 12 test(() => { 13 let cs = getComputedStyle(input); 14 for (let prop of ["border-width", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width"]) { 15 assert_equals(cs.getPropertyValue(prop), "5px", prop); 16 } 17 }, input.type); 18 } 19 </script>