Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Scroll Snap Test: scroll-padding with invalid values</title>
<meta name="assert" content="scroll-padding supports only the grammar '[ <length-percentage> | auto ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("scroll-padding-top", "20");
test_invalid_value("scroll-padding-top", "-20px");
test_invalid_value("scroll-padding-top", "none");
test_invalid_value("scroll-padding-top", "10px 20%");
test_invalid_value("scroll-padding-top", "fit-content");
test_invalid_value("scroll-padding-right", "20");
test_invalid_value("scroll-padding-right", "-20px");
test_invalid_value("scroll-padding-right", "none");
test_invalid_value("scroll-padding-right", "10px 20%");
test_invalid_value("scroll-padding-right", "max-content");
test_invalid_value("scroll-padding-bottom", "20");
test_invalid_value("scroll-padding-bottom", "-20px");
test_invalid_value("scroll-padding-bottom", "none");
test_invalid_value("scroll-padding-bottom", "10px 20%");
test_invalid_value("scroll-padding-bottom", "min-content");
test_invalid_value("scroll-padding-left", "20");
test_invalid_value("scroll-padding-left", "-20px");
test_invalid_value("scroll-padding-left", "none");
test_invalid_value("scroll-padding-left", "10px 20%");
test_invalid_value("scroll-padding-left", "fit-content");
test_invalid_value("scroll-padding", "20");
test_invalid_value("scroll-padding", "-20px");
test_invalid_value("scroll-padding", "none");
test_invalid_value("scroll-padding", "calc(auto)");
test_invalid_value("scroll-padding", "10px 20px 30px 40px 50px");
test_invalid_value("scroll-padding", "fit-content");
test_invalid_value("scroll-padding", "max-content");
test_invalid_value("scroll-padding", "min-content");
</script>
</body>
</html>