1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:47:44 +00:00

LibWeb: Account for box-sizing in grid-items width calculation

Visual improvement on (now there is a gap between grid items):
https://twinings.co.uk/collections/earl-grey-tea
This commit is contained in:
Aliaksandr Kalenik 2023-11-02 05:16:51 +01:00 committed by Andreas Kling
parent e02a4f5181
commit 2fb0cede9a
3 changed files with 49 additions and 3 deletions

View file

@ -0,0 +1,16 @@
<!DOCTYPE html><style type="text/css">
* {
border: 1px solid black;
}
.grid {
grid-template-columns: 1fr 1fr;
display: grid;
}
.item {
padding: 0 100px;
width: 100%;
box-sizing: border-box;
}
</style><div class="grid"><div class="item"><div>One</div></div><div class="item"><div>Two</div></div></div>