Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: min-content sizing and white-space: pre-wrap</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com">
<link rel="match" href="../overflow-wrap/reference/overflow-wrap-min-content-size-009-ref.html">
<meta name="assert" content="word-break: break-word should behave as overflow-wrap: anywhere, so breaking opportunities **are not** considered when calculating min-content intrinsic sizes.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
div {
font: 20px/1 Ahem;
}
.test {
color: green;
background: red;
z-index: -1;
width: min-content;
white-space: pre-wrap;
word-break: break-word;
}
.ref {
position: absolute;
background: green;
color: transparent;
}
</style>
<p>Test passes if there is a green box below and no red.
<div class="ref"><br><br>X</div>
<div class="test">&#9;&#9;<span>XX</span></div>