Files
ladybird/Tests/LibWeb/Text/input/position-serialization.html
Callum Law 68d07355ed LibWeb: Coordinate border-* longhands at compute time
Updates the `position-serialization.html` test to be 2-valued so that
all cases are covered.
2025-12-08 11:46:50 +00:00

26 lines
849 B
HTML

<!DOCTYPE html>
<script src="include.js"></script>
<div id="target" style="background-image: none, none;"></div>
<script>
test(() => {
const values = [
"center",
"left bottom",
"center top",
"center top 20%",
"left 10px top 20%",
"10px top",
"right 10px bottom 20%",
"center, left bottom",
"left 10px bottom 20%, right 10px top 20%"
];
const target = document.getElementById('target');
for (const value of values) {
target.style.setProperty("background-position", value);
println("inline: " + target.style.getPropertyValue("background-position"));
println("computed: " + getComputedStyle(target).getPropertyValue("background-position"));
}
});
</script>