ladybird
ladybird copied to clipboard
LibWeb/CSS: If possible, simplify `min()` and `max()` calculations
Why
According to the spec, the min() and max() calculation can be simplified, if there is only one child:
- https://www.w3.org/TR/css-values-4/#calc-simplification (see 5.2)
Should fix few WPT tests, for example:
- https://wpt.fyi/results/css/css-values/minmax-length-percent-computed.html?label=experimental&product=chrome&product=ladybird
How
Return the sole child string value directly in to_string calls on MinCalculationNode and MaxCalculationNode nodes.