<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Scroll Snap Test: scroll-margin with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin">
<meta name="assert" content="scroll-margin supports the full grammar '<length>{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_valid_value("scroll-margin-top", "0", "0px");
test_valid_value("scroll-margin-top", "-10px");
test_valid_value("scroll-margin-top", "calc(2em + 3ex)");


test_valid_value("scroll-margin-right", "0", "0px");
test_valid_value("scroll-margin-right", "-10px");
test_valid_value("scroll-margin-right", "calc(2em + 3ex)");


test_valid_value("scroll-margin-bottom", "0", "0px");
test_valid_value("scroll-margin-bottom", "-10px");
test_valid_value("scroll-margin-bottom", "calc(2em + 3ex)");


test_valid_value("scroll-margin-left", "0", "0px");
test_valid_value("scroll-margin-left", "-10px");
test_valid_value("scroll-margin-left", "calc(2em + 3ex)");


test_valid_value("scroll-margin", "0", "0px");
test_valid_value("scroll-margin", "-10px");
test_valid_value("scroll-margin", "calc(2em + 3ex)");

test_valid_value("scroll-margin", "1px 2px");
test_valid_value("scroll-margin", "1px 2px 3px");
test_valid_value("scroll-margin", "1px 2px 3px 4px");
test_valid_value("scroll-margin", "0 0 0 0", "0px");
</script>
</body>
</html>
