LibWeb: Implement composition for FitContentStyleValue

This commit is contained in:
Callum Law
2026-04-01 11:31:26 +13:00
committed by Sam Atkins
parent af17641b0a
commit f4e7e193da
Notes: github-actions[bot] 2026-04-09 20:43:37 +00:00
3 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<!doctype html>
<div id="target"></div>
<script src="../include.js"></script>
<script>
test(() => {
target.style.width = "fit-content(5px)";
let animation = target.animate([
{ offset: 0, composite: "add", width: "fit-content(5px)" },
{ offset: 1, composite: "add", width: "fit-content(15px)" },
], { duration: 1000, fill: "forwards" });
animation.pause();
for (let time of [0, 500, 1000]) {
animation.currentTime = time;
println(target.computedStyleMap().get("width").toString());
}
});
</script>