mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
LibWeb: Fix grid size when intrinsically sized
This fixes a bug that was seen when a combination of the grid having been floated with `float: left` and a `minmax()` column size were used. The issue was that a grid track size should be considered intrinsically sized if both the min and max sizes are intrinsic, not just one of them.
This commit is contained in:
parent
9f691b7fe4
commit
c987c934d0
5 changed files with 67 additions and 2 deletions
24
Tests/LibWeb/Layout/input/grid/intrinsic-sized-column.html
Normal file
24
Tests/LibWeb/Layout/input/grid/intrinsic-sized-column.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
float: left;
|
||||
font-family: 'SerenitySans';
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: 20px;
|
||||
}
|
||||
|
||||
.whee {
|
||||
background: pink;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="grid">
|
||||
<div class="whee" style="border: 1px solid black;">whee
|
18
Tests/LibWeb/Layout/input/grid/intrinsic-sized-grid.html
Normal file
18
Tests/LibWeb/Layout/input/grid/intrinsic-sized-grid.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html><html><head><style>
|
||||
* {
|
||||
border: 1px solid black !important;
|
||||
}
|
||||
body {
|
||||
float: left;
|
||||
font-family: 'SerenitySans';
|
||||
}
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-areas: "foo whee";
|
||||
grid-template-columns: min-content minmax(0, auto) min-content;
|
||||
}
|
||||
.whee {
|
||||
grid-area: whee;
|
||||
background: pink;
|
||||
}
|
||||
</style></head><body><div class="grid"><div class="whee">whee
|
Loading…
Add table
Add a link
Reference in a new issue