Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-ui/button-author-level-padding-applies.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Author-level CSS padding should apply to buttons with native appearance</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<button id="btn"></button>
<script>
test(() => {
let value = "10px";
btn.style.paddingLeft = value;
assert_equals(window.getComputedStyle(btn).paddingLeft, value);
btn.style.paddingTop = value;
assert_equals(window.getComputedStyle(btn).paddingTop, value);
btn.style.paddingRight = value;
assert_equals(window.getComputedStyle(btn).paddingRight, value);
btn.style.paddingBottom = value;
assert_equals(window.getComputedStyle(btn).paddingBottom, value);
});
</script>
</body>
</html>