mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
LibWeb: Fix overeager fallback to stretch-fit width for some flex items
If a flex item has a preferred aspect ratio and the flex basis is not definite, we were falling back to using stretch-fit for the main size, since that appeared to match other browsers. However, we missed the case where we actually have a definite cross size through which the preferred aspect ratio can be naturally resolved.
This commit is contained in:
parent
9c02ace897
commit
db1faef786
Notes:
sideshowbarker
2024-07-17 22:55:25 +09:00
Author: https://github.com/awesomekling
Commit: db1faef786
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/258
3 changed files with 36 additions and 3 deletions
|
@ -0,0 +1,19 @@
|
|||
<!doctype html><style type="text/css">
|
||||
* { outline: 1px solid black; }
|
||||
html {
|
||||
background: white;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
background: orange;
|
||||
width: 200px;
|
||||
}
|
||||
svg {
|
||||
background: cyan;
|
||||
height: 20px;
|
||||
}
|
||||
div {
|
||||
background: magenta;
|
||||
width: 100px;
|
||||
}
|
||||
</style><body><svg viewBox="0 0 24 24"><rect x=0 y=0 width=12 height=12></svg><div>
|
Loading…
Add table
Add a link
Reference in a new issue