ladybird/Tests/LibWeb/Text/input/css/getComputedStyle-relative-property-values.html
Tim Ledbetter 0b0ad5c9db LibWeb: Calculate width property resolved value correctly
This means that relative width values are now correctly resolved when
calling `getComputedStyle()`.
2024-05-28 08:08:31 +02:00

26 lines
604 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<style>
#outer {
width: 10px;
height: 20px;
}
#inner {
width: 50%;
height: 20%;
}
</style>
<div id="outer"><div id="inner"></div></div>
<script>
test(() => {
const inner = document.getElementById("inner");
const style = getComputedStyle(inner);
const propertyValues = [
"height",
"width",
];
for (const property of propertyValues) {
println(`${property}: ${style.getPropertyValue(property)}`);
}
});
</script>