mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibWeb: Fix box alignment when it has min-width or max-width in GFC
Changing `try_compute_width()` to return width and margins, instead of mutating them in the box's state makes it works in cases when box has min-width or max-width and this function needs to be called multiple times. Fixes https://github.com/SerenityOS/serenity/issues/21598
This commit is contained in:
parent
895ec6ad09
commit
d1a01c4c65
3 changed files with 75 additions and 28 deletions
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html><style>
|
||||
* {
|
||||
outline: 1px solid black !important;
|
||||
}
|
||||
html {
|
||||
background: white;
|
||||
}
|
||||
body {
|
||||
display: grid;
|
||||
background: wheat;
|
||||
}
|
||||
section {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-width: 500px;
|
||||
place-self: start;
|
||||
background: pink;
|
||||
height: 200px;
|
||||
}
|
||||
</style><body><section>
|
Loading…
Add table
Add a link
Reference in a new issue