blob: 738d7f646f731777bb74abbfa5c8974645c164de (
plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Text Test: 'white-space: break-spaces' applies to 'display: list-item' element</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property">
<link rel="match" href="reference/ws-break-spaces-applies-to-003-ref.html">
<meta content="When 'white-space' is 'break-spaces', then new lines, sequence of white spaces and tabs are preserved and text can wrap, just like pre-wrap, but sequence of preserved white space always takes up space, including at the end of the line and line breaking opportunity exists after every preserved white space character, including between white space characters. In this test, 'display: list-item' is tested." name="assert">
<!--
Testing of 'white-space: break-spaces':
ws-break-spaces-applies-to-001: display: inline
ws-break-spaces-applies-to-002: display: block
ws-break-spaces-applies-to-003: display: list-item
ws-break-spaces-applies-to-005: display: inline-block
ws-break-spaces-applies-to-006: display: table
ws-break-spaces-applies-to-007: display: inline-table
ws-break-spaces-applies-to-008: display: table-row-group
ws-break-spaces-applies-to-009: display: table-header-group
ws-break-spaces-applies-to-010: display: table-footer-group
ws-break-spaces-applies-to-011: display: table-row
ws-break-spaces-applies-to-012: display: table-column-group
ws-break-spaces-applies-to-013: display: table-column
ws-break-spaces-applies-to-014: display: table-cell
ws-break-spaces-applies-to-015: display: table-caption
-->
<style>
div#test, li#reference
{
border: black solid 2px;
font-family: monospace;
font-size: 32px;
margin-bottom: 0.25em;
width: 4ch;
}
div#test
{
display: list-item;
margin-left: 40px;
white-space: break-spaces;
}
li#reference
{
white-space: pre;
}
</style>
<p>Test passes if the characters inside of each black-bordered rectangles (both preceded with a small filled disc) are laid out identically.
<div id="test">123 8</div>
<!-- 45678 -->
<!-- will wrap here ^ -->
<ul><li id="reference">123
8</ul>
|