Any property that allows a numeric type (either a <number>
, <integer>
, or a number with a unit like a <length>
or <percentage>
or any other dimension type) can also be a math function such as calc()
. These require special handling in the code to store the calculation, and resolve them when needed.
Generally:
CSSStyleValue
all do this already.)StyleProperties.h
needs to be a type that can store a math function - for example, for Length
that would be LengthOrCalculated
. Note that the *Percentage
types can also store math functions.StyleProperties
getter for the property, if it has one, needs to also check for math values and resolve them. That will likely require passing in a Layout::Node
.The following properties have been identified by the Tests/LibWeb/Text/input/css/calc-coverage.html
test added in #1788. Others might pass this test but not handle math functions later on in the process - I'll try and add those when I spot them.
filter
and backdrop-filter
Please rebaseline Tests/LibWeb/Text/input/css/calc-coverage.html
when fixing any of these!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too