mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibWeb: Fully resolve max-width values on inline-block elements
This fixes an issue where `max-width: fit-content` (and other layout-dependent values) were treated as 0 on inline-blocks.
This commit is contained in:
parent
1f4f750052
commit
2887976ce9
3 changed files with 18 additions and 1 deletions
|
@ -150,7 +150,7 @@ void InlineFormattingContext::dimension_box_on_line(Box const& box, LayoutMode l
|
|||
|
||||
CSSPixels width = unconstrained_width;
|
||||
if (!should_treat_max_width_as_none(box, m_available_space->width)) {
|
||||
auto max_width = box.computed_values().max_width().to_px(box, width_of_containing_block);
|
||||
auto max_width = calculate_inner_width(box, m_available_space->width, box.computed_values().max_width()).to_px(box);
|
||||
width = min(width, max_width);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue