LibWeb: Support calculated values in @counter-style range descriptor

Calculated values are resolved and confirmed to be valid (in line with
non-calculated values) at parse time
This commit is contained in:
Callum Law
2026-02-04 21:38:45 +13:00
committed by Jelle Raaijmakers
parent a541c09d61
commit b0274268f8
Notes: github-actions[bot] 2026-02-12 00:28:02 +00:00
3 changed files with 38 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
<!doctype html>
<style>
@counter-style valid {
range: calc(sign(1em - 1px)) calc(sign(1em - 1px) + 1);
}
@counter-style invalid {
range: calc(sign(1em - 1px) + 1) calc(sign(1em - 1px));
}
</style>
<script src="../include.js"></script>
<script>
test(() => {
for (const rule of document.styleSheets[0].cssRules) {
println(rule.cssText);
}
});
</script>