mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:27:35 +00:00
LibWeb: Treat flex item cross axis max-size as "none" in more cases
There are a bunch of situations where we need to treat cross axis max-size properties as "none", notably percentage values when the reference containing block size is an intrinsic sizing constraint. This fixes an issue where flex items with definite width would get shrunk to 0px by "max-width: 100%" in case the item itself is an SVG with no natural width or height. For consistency, we now use the should_treat_max_width/height_as_none helpers throughout FFC. This makes the search/account/cart icons show up in the top right on https://twinings.co.uk :^)
This commit is contained in:
parent
9a93f677f4
commit
72dd37438d
4 changed files with 61 additions and 12 deletions
|
@ -0,0 +1,17 @@
|
|||
<!doctype html><style>
|
||||
* {
|
||||
outline: 1px solid black !important;
|
||||
}
|
||||
svg {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
}
|
||||
div {
|
||||
display: flex;
|
||||
}
|
||||
</style><body><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display: none"><symbol id="icon-cart" viewBox="0 0 10 10"><rect x=0 y=0 width=10 height=10 fill=green></symbol></svg><div><svg class="c-ico"><use xlink:href="#icon-cart"></use></svg>
|
Loading…
Add table
Add a link
Reference in a new issue