mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:28:11 +00:00
LibWeb: Support max-content
for width
, min-width
and max-width
We're gonna need to handle this in many more places, this patch only adds it to calculate_inner_width().
This commit is contained in:
parent
358d94b57a
commit
97c510329c
4 changed files with 53 additions and 1 deletions
|
@ -1349,6 +1349,9 @@ CSS::Length FormattingContext::calculate_inner_width(Layout::Box const& box, Ava
|
|||
if (width.is_fit_content()) {
|
||||
return CSS::Length::make_px(calculate_fit_content_width(box, AvailableSpace { available_width, AvailableSize::make_indefinite() }));
|
||||
}
|
||||
if (width.is_max_content()) {
|
||||
return CSS::Length::make_px(calculate_max_content_width(box));
|
||||
}
|
||||
|
||||
auto& computed_values = box.computed_values();
|
||||
if (computed_values.box_sizing() == CSS::BoxSizing::BorderBox) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue