summaryrefslogtreecommitdiff
path: root/Tests/LibWeb/Layout/input
diff options
context:
space:
mode:
authorAliaksandr Kalenik <kalenik.aliaksandr@gmail.com>2023-05-20 17:46:21 +0300
committerAndreas Kling <kling@serenityos.org>2023-05-21 11:59:19 +0200
commit409333d80a05d9feec7cdcc3a1e53d874e29cb20 (patch)
tree79381905f3ce7ed259091af1a7c06f3014a51973 /Tests/LibWeb/Layout/input
parent943ecaede62065a2b64f537a9de58944db92df21 (diff)
downloadserenity-409333d80a05d9feec7cdcc3a1e53d874e29cb20.zip
LibWeb: Implement more of spanning tracks sizing in GFC
Implements more parts of sizing algorithm for tracks with spanning items to archive parity with implementation for sizing of tracks with non-spanning items.
Diffstat (limited to 'Tests/LibWeb/Layout/input')
-rw-r--r--Tests/LibWeb/Layout/input/grid/row-span-2-maxcontent.html53
-rw-r--r--Tests/LibWeb/Layout/input/grid/row-span-2-mincontent.html43
2 files changed, 96 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/input/grid/row-span-2-maxcontent.html b/Tests/LibWeb/Layout/input/grid/row-span-2-maxcontent.html
new file mode 100644
index 0000000000..b564ca8e42
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/grid/row-span-2-maxcontent.html
@@ -0,0 +1,53 @@
+<style>
+.grid-container {
+ display: grid;
+ grid-template-columns: auto auto;
+ grid-template-rows: max-content max-content;
+}
+
+.item-span-one-one {
+ background-color: lightpink;
+ grid-row: 1 / span 1;
+ grid-column: 2;
+}
+
+.item-span-one-two {
+ background-color: lightgreen;
+ grid-row: 2 / span 1;
+ grid-column: 2;
+}
+
+.item-span-two {
+ background-color: lightskyblue;
+ grid-row: 1 / span 2;
+ grid-column: 1;
+}
+</style>
+<div class="grid-container">
+<div class="grid-item item-span-one-one">
+In a sollicitudin augue. Sed ante augue, rhoncus nec porttitor id,
+lacinia et nibh. Pellentesque diam libero, ultrices eget eleifend at,
+consequat ut orci.
+</div>
+<div class="grid-item item-span-one-two">
+Suspendisse potenti. Pellentesque at varius lacus, sed sollicitudin leo.
+Pellentesque malesuada mi eget pellentesque tempor. Donec egestas mauris
+est, ut lobortis nisi luctus at. Vivamus eleifend, lorem vulputate
+maximus porta, nunc metus porttitor nibh, nec bibendum nulla lectus ut
+felis.
+</div>
+<div class="grid-item item-span-two">
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae
+condimentum erat, ac posuere arcu. Aenean tincidunt mi ligula, vel
+semper dolor aliquet at. Phasellus scelerisque dapibus diam sed rhoncus.
+Proin sed orci leo. Praesent pellentesque mi eu nunc gravida, vel
+consectetur nulla malesuada. Sed pellentesque, elit sit amet
+sollicitudin sollicitudin, lectus justo facilisis lacus, ac vehicula
+metus neque ac mi. In in augue et massa maximus venenatis auctor
+fermentum dui. Aliquam dictum finibus urna, quis lacinia massa laoreet
+a. Suspendisse elementum non lectus nec elementum. Quisque ultricies
+suscipit porttitor. Sed non urna rutrum, mattis nulla at, feugiat erat.
+Duis orci elit, vehicula sed blandit eget, auctor in arcu. Ut cursus
+magna sit amet nulla cursus, vitae gravida mauris dictum.
+</div>
+</div> \ No newline at end of file
diff --git a/Tests/LibWeb/Layout/input/grid/row-span-2-mincontent.html b/Tests/LibWeb/Layout/input/grid/row-span-2-mincontent.html
new file mode 100644
index 0000000000..c4e9d67f0d
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/grid/row-span-2-mincontent.html
@@ -0,0 +1,43 @@
+<style>
+.grid-container {
+ display: grid;
+ grid-template-columns: min-content min-content;
+ grid-template-rows: min-content min-content;
+}
+
+.item-span-one-one {
+ background-color: lightpink;
+ grid-row: 1 / span 1;
+ grid-column: 2;
+}
+
+.item-span-one-two {
+ background-color: lightgreen;
+ grid-row: 2 / span 1;
+ grid-column: 2;
+}
+
+.item-span-two {
+ background-color: lightskyblue;
+ grid-row: 1 / span 2;
+ grid-column: 1;
+}
+</style>
+<div class="grid-container">
+<div class="grid-item item-span-one-one">
+In a sollicitudin augue. Sed ante augue, rhoncus nec porttitor id,
+lacinia et nibh. Pellentesque diam libero, ultrices eget eleifend at,
+consequat ut orci.
+</div>
+<div class="grid-item item-span-one-two">
+Suspendisse potenti. Pellentesque at varius lacus, sed sollicitudin leo.
+Pellentesque malesuada mi eget pellentesque tempor. Donec egestas mauris
+est, ut lobortis nisi luctus at.
+</div>
+<div class="grid-item item-span-two">
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae
+condimentum erat, ac posuere arcu. Aenean tincidunt mi ligula, vel
+semper dolor aliquet at. Phasellus scelerisque dapibus diam sed rhoncus.
+Proin sed orci leo.
+</div>
+</div> \ No newline at end of file