- Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathoverflow-wrap-anywhere-004.html
37 lines (36 loc) · 1.12 KB
/
overflow-wrap-anywhere-004.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<metacharset="utf-8">
<title>CSS Text Test: overflow-wrap: anywhere</title>
<linkrel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<linkrel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere">
<metaname="flags" content="ahem">
<linkrel="match" href="reference/overflow-wrap-break-word-001-ref.html">
<metaname="assert" content="A Single leading white-space constitutes a soft breaking opportunity, honoring the 'white-space: pre-wrap' property, that must prevent the word to be broken.">
<linkrel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
position: relative;
font-size:20px;
font-family: Ahem;
line-height:1em;
}
.red {
position: absolute;
background: green;
color: red;
width:100px;
height:100px;
z-index:-1;
}
.test {
color: green;
width:5ch;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<divclass="red"><br>XXXXX</div>
<divclass="test"> XXXXX </div>
</body>