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

LibWeb: Implement CSS Angle class

This corresponds to `<angle>` in the grammar.
This commit is contained in:
Sam Atkins 2022-02-21 17:43:30 +00:00 committed by Andreas Kling
parent a07fed4e53
commit 355d1936f2
9 changed files with 293 additions and 31 deletions

View file

@ -4298,6 +4298,8 @@ Optional<CalculatedStyleValue::CalcValue> Parser::parse_calc_value(TokenStream<S
return {};
auto& dimension = maybe_dimension.value();
if (dimension.is_angle())
return CalculatedStyleValue::CalcValue { dimension.angle() };
if (dimension.is_length())
return CalculatedStyleValue::CalcValue { dimension.length() };
if (dimension.is_percentage())