mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
The constraint equations for absolutely positioned replaced elements only subtracted content width/height from the containing block size, omitting padding and border. Fixes https://github.com/LadybirdBrowser/ladybird/issues/7820
20 lines
635 B
HTML
20 lines
635 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.right { position: absolute; top: 0; right: 0; padding: 15%; background-color: green; }
|
|
.bottom { position: absolute; bottom: 0; left: 0; padding: 15%; background-color: blue; }
|
|
</style>
|
|
<svg class="right"></svg>
|
|
<svg class="bottom"></svg>
|
|
<script src="include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
for (const svg of document.querySelectorAll("svg")) {
|
|
const rect = svg.getBoundingClientRect();
|
|
println(`x: ${rect.x}`);
|
|
println(`y: ${rect.y}`);
|
|
println(`width: ${rect.width}`);
|
|
println(`height: ${rect.height}`);
|
|
}
|
|
});
|
|
</script>
|