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/word-break/word-break-min-content-003.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: word-break: break-word and intrinsic sizing</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<meta name="flags" content="ahem">
<link rel="match" href="reference/word-break-break-all-010-ref.html">
<meta name="assert" content="word-break: break-all shouldn't allow breaking before punctuation characters.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
font: 50px / 1 Ahem;
}
.fail {
background: red;
position: absolute;
color: green;
z-index: -1;
}
.test {
color: green;
width: min-content;
word-break: break-all;
}
</style>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="fail"><br>XX</div>
<div class="test"><span>X</span><span>.</span></div>