Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-lists/outside-marker-container-changed-by-inserted-block.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: the outside marker follows its first formatted line into a newly inserted block</title>
<link rel="match" href="outside-marker-container-changed-by-inserted-block-ref.html">
<meta name="assert" content="Inserting a block before the one holding the marker's first formatted line moves the marker onto the new block's line.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
ul { margin: 0; padding: 0 0 0 40px; }
li { font: 20px/20px Ahem; }
</style>
<p>The test passes if the bullet is aligned with the upper "x".</p>
<ul><li><div id="second">x</div></li></ul>
<script>
document.body.offsetHeight;
const first = document.createElement("div");
first.textContent = "x";
document.getElementById("second").before(first);
document.body.offsetHeight;
</script>