Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text/white-space/text-wrap-balance-before-after-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="match" href="reference/text-wrap-balance-before-after-002-ref.html">
<style>
.container {
font: 16px monospace;
margin: 1em;
width: 60ch;
}
.text {
text-wrap: balance;
outline: 1px dashed gray;
}
.text:before {
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
letter-spacing: -0.15ch;
display: block;
margin-bottom: 1em;
}
.text:after {
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
text-wrap-style: stable;
display: block;
margin-top: 1em;
}
</style>
<p>The first two paragraphs should be separately balanced; the third should not use balancing:</p>
<div class="container">
<div class="text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</div>