mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
32 lines
945 B
HTML
32 lines
945 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
#border-box {
|
|
box-sizing: border-box;
|
|
width: 120px;
|
|
height: 80px;
|
|
border: 10px solid black;
|
|
}
|
|
|
|
#content-box {
|
|
width: 120px;
|
|
height: 80px;
|
|
border: 10px solid black;
|
|
}
|
|
</style>
|
|
<script src="../include.js"></script>
|
|
<div id="border-box"></div>
|
|
<div id="content-box"><div style="height: 90px;"></div></div>
|
|
<script>
|
|
function dump_used_values(label, style, properties) {
|
|
for (let property of properties)
|
|
println(`${label} ${property}: ${style.getPropertyValue(property)}`);
|
|
}
|
|
|
|
test(() => {
|
|
const borderBox = document.getElementById("border-box");
|
|
const contentBox = document.getElementById("content-box");
|
|
dump_used_values("border-box", getComputedStyle(borderBox), ["width", "height"]);
|
|
dump_used_values("content-box", getComputedStyle(contentBox), ["width", "height"]);
|
|
});
|
|
</script>
|