mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibWeb: Support flex-basis: calc(...)
1. Propagate calc() values from StyleProperties to ComputedValues. 2. Actually resolve calc() values when determining the used flex basis. This makes the "support" section on https://shopify.com/ show up correctly as a 2x2 grid (instead of 1x4). :^)
This commit is contained in:
parent
e81d4ca1ac
commit
2e13f65ff4
Notes:
sideshowbarker
2024-07-17 02:14:39 +09:00
Author: https://github.com/awesomekling
Commit: 2e13f65ff4
Pull-request: https://github.com/SerenityOS/serenity/pull/18878
Reviewed-by: https://github.com/AtkinsSJ
4 changed files with 59 additions and 4 deletions
|
@ -294,6 +294,9 @@ Optional<CSS::FlexBasisData> StyleProperties::flex_basis() const
|
|||
if (value->has_length())
|
||||
return { { CSS::FlexBasis::LengthPercentage, value->to_length() } };
|
||||
|
||||
if (value->is_calculated())
|
||||
return { { CSS::FlexBasis::LengthPercentage, CSS::LengthPercentage { value->as_calculated() } } };
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue