LibWeb: Make transform: scale(calc(..)) work

The `transform` property supports transform functions that sometimes
need their `calc(percentage)` values to be converted to a number instead
of a length. Currently this only applies to the `scale*` family of
functions, which are marked as such in `TransformFunctions.json`.

We were not consistently applying the `NumberPercentage` type to these
functions though, and in addition, any `NumberPercentage` value would
not consider calculated values.
This commit is contained in:
Jelle Raaijmakers 2025-03-25 14:04:17 +00:00 committed by Sam Atkins
commit 545d151948
Notes: github-actions[bot] 2025-03-25 19:54:42 +00:00
5 changed files with 26 additions and 10 deletions

View file

@ -23,6 +23,8 @@
"translateY(1%)",
"scale(1, 2)",
"scale(100%, 200%)",
"scale(calc(1 / 2))",
"scale(calc(50% + 25%))",
"scaleX(2)",
"scaleX(200%)",
"scaleY(2.5)",