1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:27:43 +00:00

LibWeb: Add support for horizontal margins of grid items in GFC

This commit is contained in:
Aliaksandr Kalenik 2023-06-08 00:54:24 +03:00 committed by Andreas Kling
parent cbe5aeb917
commit 775742b35d
3 changed files with 193 additions and 8 deletions

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<style>
* {
border: 1px solid black;
}
.grid {
display: grid;
grid-template-columns: auto;
width: 500px;
}
.left-margin-auto {
margin-left: auto;
}
.right-margin-auto {
margin-right: auto;
}
.fit-content-width {
width: fit-content;
background-color: lightpink;
}
.fixed-width {
width: 50px;
background-color: lightgoldenrodyellow;
}
</style>
<div class="grid">
<div class="left-margin-auto right-margin-auto">auto horizontal margins and auto width</div>
<div class="left-margin-auto">auto left margin and auto width</div>
<div class="right-margin-auto">auto right margin and auto width</div>
<div class="left-margin-auto right-margin-auto fit-content-width">auto horizontal margins and fit-content width</div>
<div class="left-margin-auto fit-content-width">auto left margin and fit-content width</div>
<div class="right-margin-auto fit-content-width">auto right margin and fit-content width</div>
<div class="left-margin-auto right-margin-auto fixed-width">auto horizontal margins and fixed width</div>
<div class="left-margin-auto fixed-width">auto left margin and fixed width</div>
<div class="right-margin-auto fixed-width">auto right margin and fixed width</div>
</div>