LibWeb: Fix min-width and max-width resolution for grid items

Change try_compute_width() to check whether min-width/max-width or width
is auto instead of always using `computed_values.width()`.

`grid/min-max-content.html` test is affected but it's progression.
This commit is contained in:
Aliaksandr Kalenik 2024-09-13 00:05:43 +02:00 committed by Andreas Kling
commit de3c007d79
Notes: github-actions[bot] 2024-09-13 10:00:41 +00:00
4 changed files with 50 additions and 9 deletions

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<style>
.grid-container {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
width: 500px;
background-color: #fff;
padding: 20px;
border: 1px solid black;
}
.grid-item {
background-color: #87ceeb;
padding: 20px;
text-align: center;
font-size: 20px;
max-width: 50%;
}
</style><div class="grid-container"><div class="grid-item">One</div><div class="grid-item">Two</div></div>