1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

LibWeb: Set table width to GRIDMAX if calculated value is max-content

If the width of the table container is specified as max-content, then
it seems sensible to resolve it as the sum of the maximum widths of the
columns.
This commit is contained in:
Aliaksandr Kalenik 2023-10-31 17:41:41 +01:00 committed by Andreas Kling
parent 387ab57eb1
commit 4676b288a2
3 changed files with 26 additions and 0 deletions

View file

@ -503,6 +503,8 @@ void TableFormattingContext::compute_table_width()
used_width = max(used_width, adjusted_used_width);
}
}
} else if (computed_values.width().is_max_content()) {
used_width = grid_max;
} else {
// If the table-roots width property has a computed value (resolving to
// resolved-table-width) other than auto, the used width is the greater