mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
Base: Add more tests for display: grid
This commit is contained in:
parent
1ea90e340c
commit
ca3d479f6f
Notes:
sideshowbarker
2024-07-17 08:35:21 +09:00
Author: https://github.com/martinfalisse Commit: https://github.com/SerenityOS/serenity/commit/ca3d479f6f Pull-request: https://github.com/SerenityOS/serenity/pull/15155 Reviewed-by: https://github.com/MacDue
@ -29,3 +29,58 @@
|
||||
<div class="grid-item">3</div>
|
||||
<div class="grid-item">4</div>
|
||||
</div>
|
||||
|
||||
<!-- Check for a bug where a github page was crashing due to the following code. -->
|
||||
<p>If you can see this message then the test passed.</p>
|
||||
<div
|
||||
class="grid-container"
|
||||
style="
|
||||
--Layout-sidebar-width:296px;
|
||||
grid-template-columns: minmax(0, var(--Layout-sidebar-width));">
|
||||
<div class="grid-item">1</div>
|
||||
</div>
|
||||
|
||||
<!-- Using grid-row and grid-column -->
|
||||
<p>Should render a full-width 4x4 grid with:
|
||||
<ul>
|
||||
<li>one large column on the left</li>
|
||||
<li>one large column on the right, being split in half vertically, with the number 2 in the top half, and numbers 3, 4, 5, and 6 in the bottom</li>
|
||||
</ul>
|
||||
<div
|
||||
class="grid-container"
|
||||
style="
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
grid-template-rows: 50px 50px 50px 50px;
|
||||
">
|
||||
<div class="grid-item" style="grid-row: 1/-1; grid-column: 1/3;">1</div>
|
||||
<div class="grid-item" style="grid-row: 1/3; grid-column: 3/-1;">2</div>
|
||||
<div class="grid-item">3</div>
|
||||
<div class="grid-item">4</div>
|
||||
<div class="grid-item">5</div>
|
||||
<div class="grid-item">6</div>
|
||||
</div>
|
||||
|
||||
<!-- Different column sizes -->
|
||||
<p>Should render a 2x2 grid with columns 50px and 50%</p>
|
||||
<div
|
||||
class="grid-container"
|
||||
style="
|
||||
grid-template-columns: 50px 50%;
|
||||
grid-template-rows: auto auto;">
|
||||
<div class="grid-item"
|
||||
style="
|
||||
grid-column: 1 / 1;
|
||||
grid-row: 1 / 1">1</div>
|
||||
<div class="grid-item"
|
||||
style="
|
||||
grid-column: 2 / 2;
|
||||
grid-row: 1 / 1">2</div>
|
||||
<div class="grid-item"
|
||||
style="
|
||||
grid-column: 1 / 1;
|
||||
grid-row: 2 / 2">3</div>
|
||||
<div class="grid-item"
|
||||
style="
|
||||
grid-column: 2 / 2;
|
||||
grid-row: 2 / 2">4</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user