summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-text/white-space/pre-wrap-018.html
blob: f911b2dcdeac18fb6c5e1f531985a3d144077899 (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
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: pre-wrap spaces and centering</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/pre-wrap-018-ref.html">
<meta name="assert" content="conditionally hanging white space at the end of lines with forced breaks provides symmetry with the start of the line">
<style>
div {
  font-size: 2rem;
  margin: 1rem;
}
#test {
  white-space: pre-wrap;
  width: 5ch;
  border: solid 1px;
  font-family: monospace;
  text-align: center;
  text-decoration: underline;
}

#ref {
  white-space: pre;
  width: 5ch;
  border: solid 1px;
  font-family: monospace;
}
#ref span {
  text-decoration: underline;
}

</style>

<p>Test passes if the two boxes below are identical.

<div id=test> 0 </div>
<div id=ref> <span> 0 </span></div>