- Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathoverflow-wrap-min-content-size-007.html
31 lines (30 loc) · 1.18 KB
/
overflow-wrap-min-content-size-007.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
<!DOCTYPE html>
<metacharset="utf-8">
<title>CSS Text Test: word-break: break-word and intrinsic sizing</title>
<linkrel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<linkrel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
<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="'overflow-wrap: anywhere' allows breaking before punctuation characters and it should be considered when computing the min-content size.">
<linkrel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
font:50px/1 Ahem;
}
.fail {
position: absolute;
background: green;
color: red;
width:100px;
z-index:-1;
}
.test {
color: green;
width: min-content;
overflow-wrap: anywhere;
}
</style>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<divclass="fail">X<br>X</div>
<divclass="test"><span>X</span><span>.</span></div>