mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-03 07:32:00 +00:00
This means that relative width values are now correctly resolved when calling `getComputedStyle()`.
26 lines
604 B
HTML
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>
|