diff options
author | Andreas Kling <kling@serenityos.org> | 2023-04-16 19:31:55 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-16 20:52:32 +0200 |
commit | b9b6037d2ba312d5e31a7c10f0e9874a96d67936 (patch) | |
tree | bdb0eaf1549507e17735c4e8f7265a9f45d99c68 /Tests/LibWeb | |
parent | f488df0e10cff8e5a6d3b7e1b62773c22ab0a38b (diff) | |
download | serenity-b9b6037d2ba312d5e31a7c10f0e9874a96d67936.zip |
LibWeb: Honor gap between flex lines when using align-content: stretch
We have to take the cross gap into account when calculating the "sum of
flex line cross sizes" in "Handle 'align-content: stretch'".
Diffstat (limited to 'Tests/LibWeb')
-rw-r--r-- | Tests/LibWeb/Layout/expected/flex/stretch-alignment-with-cross-gap.txt | 10 | ||||
-rw-r--r-- | Tests/LibWeb/Layout/input/flex/stretch-alignment-with-cross-gap.html | 17 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/expected/flex/stretch-alignment-with-cross-gap.txt b/Tests/LibWeb/Layout/expected/flex/stretch-alignment-with-cross-gap.txt new file mode 100644 index 0000000000..3e244f8c6c --- /dev/null +++ b/Tests/LibWeb/Layout/expected/flex/stretch-alignment-with-cross-gap.txt @@ -0,0 +1,10 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer <html> at (1,1) content-size 798x220 children: not-inline + BlockContainer <body> at (10,10) content-size 780x202 children: not-inline + Box <div.flex> at (11,11) content-size 300x200 flex-container(row) children: not-inline + BlockContainer <div> at (12,12) content-size 100x20 flex-item children: not-inline + BlockContainer <div> at (114,12) content-size 100x20 flex-item children: not-inline + BlockContainer <div> at (12,95.333328) content-size 100x20 flex-item children: not-inline + BlockContainer <div> at (114,95.333328) content-size 100x20 flex-item children: not-inline + BlockContainer <div> at (12,178.666656) content-size 100x20 flex-item children: not-inline + BlockContainer <div> at (114,178.666656) content-size 100x20 flex-item children: not-inline diff --git a/Tests/LibWeb/Layout/input/flex/stretch-alignment-with-cross-gap.html b/Tests/LibWeb/Layout/input/flex/stretch-alignment-with-cross-gap.html new file mode 100644 index 0000000000..bb064ff4bb --- /dev/null +++ b/Tests/LibWeb/Layout/input/flex/stretch-alignment-with-cross-gap.html @@ -0,0 +1,17 @@ +<!doctype html><style> +* { + border: 1px solid black; +} +.flex { + display: flex; + align-content: stretch; + width: 300px; + height: 200px; + flex-wrap: wrap; + row-gap: 50px; +} +.flex > div { + width: 100px; + height: 20px; +} +</style><div class="flex"><div></div><div></div><div></div><div></div><div></div><div></div>
\ No newline at end of file |