Files
ladybird/Tests/LibWeb/Text/input/css/aspect-ratio-clamped-calculated-ratio.html
Callum Law 02db1b942b LibWeb: Improve handling of calculated values in <ratio>
We no longer try to resolve calculated values at parse time which means
we support relative lengths.

We now clamp negative values rather than rejecting them at parse time.

Parsing has been inlined into `parse_ratio_value` and `parse_ratio` has
been removed since `parse_ratio_value` was the only caller
2026-03-24 14:00:01 +00:00

15 lines
313 B
HTML

<!doctype html>
<style>
#foo {
aspect-ratio: calc(-1) / 1;
}
</style>
<div id="foo"></div>
<script src="../include.js"></script>
<script>
test(() => {
println(document.styleSheets[0].cssRules[0].style.aspectRatio);
println(getComputedStyle(foo).aspectRatio);
});
</script>