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-002.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="../overflow-wrap/reference/overflow-wrap-min-content-size-003-ref.html">
<meta name="assert" content="word-break: break-word should behave as overflow-wrap: anywhere, so breaks at edge of inline elements.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
#wrapper {
width: 0px;
font: 16px / 1 Ahem;
word-break: break-word;
color: green;
}
#test {
float: left;
}
#reference {
position: absolute;
width: 16px;
height: 128px;
background: red;
z-index: -1;
}
</style>
<p>Test passes if there is a vertical green bar below.
<div id="wrapper">
<div id="reference"></div>
<div id="test"><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span></div>
</div>