summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/pagination/allowed-page-breaks-001b.xht
blob: c041b92becb8b02caeb663dd7cc7ae0c5985d69a (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: allowed page breaks between table rows</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-break-props"/>
<link rel="help" href="http://www.w3.org/TR/css3-page/#allowed-pg-brk"/>
<meta name="assert" content="Unforced breaking in the vertical margin between
	sibling table rows is allowed only if the 'page-break-after' and
	'page-break-before' properties of all the elements generating boxes
	that meet at this margin are 'auto' and the common ancestors of all
	the elements do not have a 'page-break-inside' value of 'avoid'."/>
<meta name="flags" content="may paged" />
<style type="text/css">
	html, body { height: 100%; line-height: 1; font-size: 20px; margin: 0; padding: 0; }
	.spacer { height: 50%; }
	.backup { margin-top: -1em; }
	.start { page-break-before: always; }

	.avoidBefore { page-break-before: avoid; }
	.avoidAfter	{ page-break-after:	avoid; }
	.avoidInside { page-break-inside: avoid; }
	.allowInside { page-break-inside: auto; }

	table, tbody, tr, td {
		border-collapse: collapse;
		margin: 0; padding: 0;
		border-spacing: 0;
		color: blue;
	}
	table, tbody { page-break-inside: avoid; /* override any UA settings */ }
</style>
</head>
<body>
	<div class="spacer">
		Lines A-N must appear on the 10 pages of this test. The blue text
		must accurately describe the page numbers.
	</div><div class="spacer backup"></div>
	<table><tbody class="avoidInside">
		<tr><td>Page&nbsp;2&nbsp;Line&nbsp;A</td></tr>
		<tr><td>Page&nbsp;2&nbsp;Line&nbsp;B</td></tr>
	</tbody></table>

	<div class="spacer start">
		<tr><td>Page&nbsp;3&nbsp;Line&nbsp;C</td></tr>
	</div><div class="spacer backup"></div>
	<div class="avoidInside"><div><div><div><div><table><tbody class="allowInside">
		<tr><td>Page&nbsp;4&nbsp;Line&nbsp;D</td></tr>
		<tr><td>Page&nbsp;4&nbsp;Line&nbsp;E</td></tr>
	</tbody></table></div></div></div></div></div>

	<div class="spacer start">
		<tr><td>Page&nbsp;5&nbsp;Line&nbsp;F</td></tr>
	</div><div class="spacer backup"></div>
	<table><tbody class="allowInside">
		<tr><td>Page&nbsp;5&nbsp;Line&nbsp;G</td></tr>
		<tr><td>Page&nbsp;6&nbsp;Line&nbsp;H</td></tr>
	</tbody></table>

	<div class="spacer start">
		<tr><td>Page&nbsp;7&nbsp;Line&nbsp;I</td></tr>
	</div><div class="spacer backup"></div>
	<table><tbody>
		<tr class="avoidAfter"><td>Page&nbsp;8&nbsp;Line&nbsp;J</td></tr>
		<tr><td>Page&nbsp;8&nbsp;Line&nbsp;K</td></tr>
	</tbody></table>

	<div class="spacer start">
		<tr><td>Page&nbsp;9&nbsp;Line&nbsp;L</td></tr>
	</div><div class="spacer backup"></div>
	<table><tbody>
		<tr><td>Page&nbsp;10&nbsp;Line&nbsp;M</td></tr>
		<tr class="avoidBefore"><td>Page&nbsp;10&nbsp;Line&nbsp;N</td></tr>
	</tbody></table>
</body>
</html>