Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 2 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-text/overflow-wrap/overflow-wrap-break-word-nowrap-span-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Text: overflow-wrap: break-word between white-space: nowrap inline boxes</title>
<meta name="assert" content="The boundary between two white-space: nowrap inline boxes is controlled by the white-space property of their nearest common ancestor, so overflow-wrap: break-word may break the line there, but it does not affect min-content.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
.test {
position: relative;
font: 10px/1 Ahem;
width: 100px;
overflow-wrap: break-word;
}
.test span {
white-space: nowrap;
}
</style>
<body onload="checkLayout('.test')">
<div class="test" title="breaks between the inline boxes"><span data-offset-y="0">X XX</span><span data-offset-y="0">XX XX</span><span data-offset-y="10">X XXX</span></div>
<div class="test" style="width: 10px" title="breaks after each overflowing inline box"><span data-offset-y="0">X XX</span><span data-offset-y="10">XX XX</span><span data-offset-y="20">X XXX</span></div>
<div class="test" style="width: min-content" data-expected-width="140" title="the boundaries are not soft wrap opportunities for min-content"><span data-offset-y="0">X XX</span><span data-offset-y="0">XX XX</span><span data-offset-y="0">X XXX</span></div>
</body>