diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-flexbox/percentage-padding-001.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-flexbox/percentage-padding-001.html')
-rw-r--r-- | testing/web-platform/tests/css/css-flexbox/percentage-padding-001.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/percentage-padding-001.html b/testing/web-platform/tests/css/css-flexbox/percentage-padding-001.html new file mode 100644 index 0000000000..0762513995 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/percentage-padding-001.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<script src='/resources/testharness.js'></script> +<script src='/resources/testharnessreport.js'></script> +<script src='/resources/check-layout-th.js'></script> +<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-box-3/#padding-physical" title="Percentages line"> +<meta name="assert" content="item's padding is resolved against parent's size, not item's" /> + +<style> +x-flexbox { + display: flex; + height: 50px; + width: 500px; +} + +x-item { + padding-left: 10%; + background: blue; + position: relative; /* Just so offsetLeft returns distance between x-item and div */ +} + +div { + height: 50px; + width: 50px; + background: orange; +} +</style> + +If the item's % padding is calculated correctly, there is a blue square on the left and an orange square on the right, both 50x50. + +<x-flexbox> + <x-item> + <div data-offset-x=50></div> + </x-item> +</x-flexbox> + +<script> +checkLayout('x-flexbox'); +</script> |