blob: 6e6cd13c7f05daf708d89264527923d5cd41b1da [file] [log] [blame]
<!DOCTYPE html>
| The value "pre" of property "white-space" does not allow wrapping. Content
| that does not fit the block container overflows it. While the spec states
| that spaces should be treated as non-breaking spaces within white-space pre,
| it does not make any similar statements about non-space characters. As a
| result, Cobalt includes the unmodified characters at the trailing edge of a
| white-space pre block during line-breaking when they are not spaces.
<meta charset="utf-8">
body {
margin: 0px;
font-family: Roboto;
font-size: 18px;
div {
background-color: #03a9f4;
width: 100px;
.pre-box {
white-space: pre;
video {
background-color: #f50057;
width: 80px;
height: 20px;
.inline-block {
background-color: #aeea00;
display: inline-block;
width: 80px;
height: 20px;
<div><span class="pre-box">中中中中中</span>子子</div>
<div><span><span class="pre-box">中中中中中</span>子子</span></div>
<div><span class="pre-box">中中中中中</span><span>子子</span></div>
<div><span><span class="pre-box">中中中中中</span><span>子子</span></span></div>
<div><span class="pre-box">中中中中中</span><video></video></div>
<div><span><span class="pre-box">中中中中中</span><video></video></span></div>
<div><span class="pre-box">中中中中中</span><span class="inline-block"></span></div>
<div><span><span class="pre-box">中中中中中</span><span class="inline-block"></span></span></div>