mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 13:48:23 +02:00
Automatic update from web-platform-tests CSS: Consolidate block/inline tests for scroll-margin, scroll-padding Tests for scroll-padding-inline-start, scroll-padding-block-start, scroll-padding-inline-end, scroll-padding-block-end now appear together. Tests for scroll-margin-block-start, scroll-margin-inline-start, scroll-margin-block-end, scroll-margin-inline-end now appear together. Added tests that calc(auto) is rejected. Change-Id: I06759db50dd21e2654df494255a4e41233cdcae6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771486 Commit-Queue: Eric Willigers <ericwilligers@chromium.org> Reviewed-by: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#690905} -- wpt-commits: b690813a7231b0891fed00e7397b441b58ef0cb8 wpt-pr: 18687
70 lines
3.4 KiB
HTML
70 lines
3.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>CSS Scroll Snap: getComputedStyle().scrollPaddingBlock / scrollPaddingInline</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#padding-longhands-logical">
|
|
<meta name="assert" content="scroll-padding-block, scroll-padding-inline computed value is per side, either the keyword auto or a computed <length-percentage> value.">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/css/support/computed-testcommon.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="target"></div>
|
|
<style>
|
|
#target {
|
|
font-size: 40px;
|
|
}
|
|
</style>
|
|
<script>
|
|
test_computed_value("scroll-padding-block-start", "auto");
|
|
test_computed_value("scroll-padding-block-start", "10px");
|
|
test_computed_value("scroll-padding-block-start", "20%");
|
|
test_computed_value("scroll-padding-block-start", "calc(10px + 0.5em)", "30px");
|
|
test_computed_value("scroll-padding-block-start", "calc(10px - 0.5em)", "0px");
|
|
test_computed_value("scroll-padding-block-start", "calc(50% + 60px)");
|
|
|
|
test_computed_value("scroll-padding-block-end", "auto");
|
|
test_computed_value("scroll-padding-block-end", "10px");
|
|
test_computed_value("scroll-padding-block-end", "20%");
|
|
test_computed_value("scroll-padding-block-end", "calc(10px + 0.5em)", "30px");
|
|
test_computed_value("scroll-padding-block-end", "calc(10px - 0.5em)", "0px");
|
|
test_computed_value("scroll-padding-block-end", "calc(50% + 60px)");
|
|
|
|
test_computed_value("scroll-padding-inline-start", "auto");
|
|
test_computed_value("scroll-padding-inline-start", "10px");
|
|
test_computed_value("scroll-padding-inline-start", "20%");
|
|
test_computed_value("scroll-padding-inline-start", "calc(10px + 0.5em)", "30px");
|
|
test_computed_value("scroll-padding-inline-start", "calc(10px - 0.5em)", "0px");
|
|
test_computed_value("scroll-padding-inline-start", "calc(50% + 60px)");
|
|
|
|
test_computed_value("scroll-padding-inline-end", "auto");
|
|
test_computed_value("scroll-padding-inline-end", "10px");
|
|
test_computed_value("scroll-padding-inline-end", "20%");
|
|
test_computed_value("scroll-padding-inline-end", "calc(10px + 0.5em)", "30px");
|
|
test_computed_value("scroll-padding-inline-end", "calc(10px - 0.5em)", "0px");
|
|
test_computed_value("scroll-padding-inline-end", "calc(50% + 60px)");
|
|
|
|
|
|
test_computed_value("scroll-padding-block", "auto");
|
|
test_computed_value("scroll-padding-block", "10px");
|
|
test_computed_value("scroll-padding-block", "20%");
|
|
test_computed_value("scroll-padding-block", "calc(10px + 0.5em)", "30px");
|
|
test_computed_value("scroll-padding-block", "calc(10px - 0.5em)", "0px");
|
|
test_computed_value("scroll-padding-block", "calc(50% + 60px)");
|
|
test_computed_value("scroll-padding-block", "1px 2px");
|
|
test_computed_value("scroll-padding-block", "1px auto");
|
|
test_computed_value("scroll-padding-block", "auto auto", "auto");
|
|
|
|
test_computed_value("scroll-padding-inline", "auto");
|
|
test_computed_value("scroll-padding-inline", "10px");
|
|
test_computed_value("scroll-padding-inline", "20%");
|
|
test_computed_value("scroll-padding-inline", "calc(10px + 0.5em)", "30px");
|
|
test_computed_value("scroll-padding-inline", "calc(10px - 0.5em)", "0px");
|
|
test_computed_value("scroll-padding-inline", "calc(50% + 60px)");
|
|
test_computed_value("scroll-padding-inline", "1px 2px");
|
|
test_computed_value("scroll-padding-inline", "1px auto");
|
|
test_computed_value("scroll-padding-inline", "auto auto", "auto");
|
|
</script>
|
|
</body>
|
|
</html>
|