blob: 48e8854c234e041d57b8595de8afbf43b5227633 [file] [log] [blame]
<!DOCTYPE html>
<!--
| The value "pre-wrap" of property "white-space" allows wrapping, while also
| preserving white-space.
| https://www.w3.org/TR/css3-text/#white-space-property
| NOTE: Cobalt's behavior, where non-collapsible trailing white space within a
| soft-wrap segment causes the soft-wrap segment to wrap to the next line,
| matches the behavior of Firefox. WebKit, on the other hand, ignores the
| trailing white space when determining whether or not to wrap a soft-wrap
| segment. IE inexplicably ignores the trailing white space if it is followed
| by additional text, but includes it otherwise.
-->
<html>
<head>
<style>
body {
margin: 0px;
font-family: Roboto;
font-size: 20px;
}
.containing-block {
background-color: #03a9f4;
width: 200px;
}
.pre-wrap-class {
white-space: pre-wrap;
}
</style>
</head>
<body>
<div class="containing-block">
<div class="pre-wrap-class">abc def ghi jkl mno pqr stu vwx yz</div>
<div class="pre-wrap-class">abc def </div>
<div class="pre-wrap-class">abc def ghi jkl</div>
<div class="pre-wrap-class">abc def</div>
<div>
<span class="pre-wrap-class">abc def </span>
</div>
<div>
<span class="pre-wrap-class">abc def ghi jkl</span>
</div>
</div>
</body>
</html>