Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Multi-column Layout: a block level box on a line moved by a column break</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#columns {
columns: 2;
column-gap: 0;
column-fill: auto;
width: 400px;
height: 45px;
font: 16px/18px monospace;
orphans: 1;
widows: 1;
}
#target {
height: 10px;
background: green;
}
</style>
<div id="columns">
<div>line one<br>line two<br><span><span id="text">after break</span><div id="target"></div></span></div>
</div>
<script>
test(() => {
var line = document.getElementById("text").getBoundingClientRect();
var target = document.getElementById("target").getBoundingClientRect();
assert_equals(target.left, line.left, "left edge");
assert_equals(target.top, line.bottom, "top edge");
}, "A block level box starts where the line before it ends, in the column that line was moved to");
</script>