-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.html
382 lines (319 loc) · 10 KB
/
tests.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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Chunks - Tests</title>
<!-- THE CSS FILE BEING TESTED IS: -->
<link rel="stylesheet" href="chunks.css" type="text/css" charset="utf-8"/>
<!-- THE FOLLOWING CSS RULES ARE ONLY USED FOR THE TESTS -->
<style type="text/css" media="screen">
.T-sandbox {
background-image: url(data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%01%03%00%00%00%25%3Dm%22%00%00%00%03sBIT%08%08%08%DB%E1O%E0%00%00%00%06PLTE%CC%CC%CC%FF%FF%FF%D3%8D%15v%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%16tEXtCreation%20Time%0017%2F02%2F11%D3%C5%10%2C%00%00%00%1CtEXtSoftware%00Adobe%20Fireworks%20CS4%06%B2%D3%A0%00%00%00%10IDAT%08%99c%60%F8%CF%80%15%E1%10%06%00~%BF%0F%F1%7DE%19%92%00%00%00%00IEND%AEB%60%82);
border: 3px dotted red;
margin-bottom: 20px;
position: relative;
}
.T-sandbox:after {
clear: both;
content: ".";
display: block;
height: 0;
visibility: hidden;
}
.T-desc { font-size: x-small; }
</style>
</head>
<body>
<p>
This document is used to test the behavior of <strong>Chunks</strong>.
As it is (unfortunately) not feasible to automatically test the rules,
tests must be validated manually.
</p>
<p>
For each test:
</p>
<ol>
<li>
Read the description and text contained in the test.
</li>
<li>
Observe the test appearance.
</li>
<li>
If the test is displayed in accordance with the description, the
test passes. Otherwise, it fails.
</li>
</ol>
<p>
Ideally, tests should be run in every browser.
</p>
<div class="T-sandbox" style="width: 50%;">
<em>
Each individual test is contained in a box with red dotted borders
like this one.
</em>
</div>
<h2>.Wrapper</h2>
<div class="T-desc">Must not be wider than 950 pixels</div>
<div class="T-sandbox">
<div class="Wrapper" style="background-color: gray;">
When the page is larger than 950px, this gray block should be
950px wide.<br/>
Otherwise, it should be as wide as the page (Resize the browser
to check).
</div>
</div>
<div class="T-desc">Must have equal left and right margins (centered)</div>
<div class="T-sandbox">
<div class="Wrapper" style="background-color: gray; width: 250px;">
This gray block should be centered, but this text should not.
</div>
</div>
<div class="T-desc">Must wrap floated elements</div>
<div class="T-sandbox">
<div class="Wrapper" style="background-color: gray;">
<div style="float: left; width: 150px;background-color: cyan;">
This (floated) cyan block should be contained entirely in a
gray block.
</div>
</div>
</div>
<div class="T-desc">Must have a top margin</div>
<div class="T-sandbox">
<div class="Wrapper" style="background-color: gray;">
↑ There should be some blank space above. ↑
</div>
</div>
<div class="T-desc">Must have a bottom margin</div>
<div class="T-sandbox">
<div class="Wrapper" style="background-color: gray;">
↓ There should be some blank space below. ↓
</div>
</div>
<div class="T-desc">Must have left padding</div>
<div class="T-sandbox">
<div class="Wrapper" style="background-color: gray;">
← There should be 5px between the arrow and the border of the
block.
</div>
</div>
<div class="T-desc">Must have right padding</div>
<div class="T-sandbox" style="text-align: right;">
<div class="Wrapper" style="background-color: gray;">
There should be 5px between the arrow and the border of the
block. →
</div>
</div>
<h2>.Chunk</h2>
<div class="T-desc">Must not have any margins when alone</div>
<div class="T-sandbox">
<div class="Chunk" style="background-color: gray;">
There shouldn't be margins around this gray block.
</div>
</div>
<div class="T-desc">Must have margins between chunks</div>
<div class="T-sandbox">
<div class="Chunk" style="background-color: gray;">
↓ There should be some blank space here. ↓
</div>
<div class="Chunk" style="background-color: gray;">
↑ There should be some blank space here. ↑
</div>
</div>
<div class="T-desc">Must wrap floated elements</div>
<div class="T-sandbox">
<div class="Chunk" style="background-color: gray;">
<div style="float: left; width: 150px;background-color: cyan;">
This (floated) cyan block should be contained entirely in a
gray block.
</div>
</div>
</div>
<h3>.Chunk .d .by2</h3>
<div class="T-desc">Must be displayed as a two columns layout</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by2" style="background-color: gray;">
This gray block should be on the left, taking no more than
half the width.<br/>
There should be a gutter on the right. →
</div>
<div class="Chunk d by2" style="background-color: gray;">
This gray block should be on the right, taking no more than
half the width.<br/>
Its top should be aligned with the top of the left block.
</div>
</div>
</div>
<h3>.Chunk .d .by3</h3>
<div class="T-desc">Must be displayed as a three columns layout</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by3" style="background-color: gray;">
This gray block should be on the left, taking no more than
a third of the width.<br/>
There should be a gutter on the right. →
</div>
<div class="Chunk d by3" style="background-color: gray;">
This gray block should be in the center, taking no more than
a third of the width.<br/>
There should be a gutter on the right. →<br/>
Its top should be aligned with the top of the left block.
</div>
<div class="Chunk d by3" style="background-color: gray;">
This gray block should be on the right, taking no more than
a third of the width.<br/>
Its top should be aligned with the top of the left block.
</div>
</div>
</div>
<h4>.Chunk .d .by3 .x2</h4>
<div class="T-desc">Must be displayed as a 2/3 column</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by3 x2" style="background-color: gray;">
This gray block should be ~2/3 wide, with a margin on the
right.
</div>
<div class="Chunk d by3" style="background-color: cyan;">
Control block (on the right).
</div>
</div>
</div>
<h3>.Chunk .d .by4</h3>
<p>
From now on, column behavior is assumed to be similar to previous
ones. Blocks must appear in correct order.
</p>
<div class="T-desc">Must be displayed as a four columns layout</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by4" style="background-color: gray;">
1
</div>
<div class="Chunk d by4" style="background-color: gray;">
2
</div>
<div class="Chunk d by4" style="background-color: gray;">
3
</div>
<div class="Chunk d by4" style="background-color: gray;">
4
</div>
</div>
</div>
<h4>.Chunk .d .by4 .x2</h4>
<div class="T-desc">Must be displayed as a 1/2 column</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by4 x2" style="background-color: gray;">
This gray block must be ~1/2 wide with a right margin.
</div>
<div class="Chunk d by4" style="background-color: cyan;">
Control block 1.
</div>
<div class="Chunk d by4" style="background-color: cyan;">
Control block 2.
</div>
</div>
</div>
<h4>.Chunk .d .by4 .x3</h4>
<div class="T-desc">Must be displayed as a 3/4 column</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by4 x3" style="background-color: gray;">
This gray block must be ~3/4 wide with a right margin.
</div>
<div class="Chunk d by4" style="background-color: cyan;">
Control block.
</div>
</div>
</div>
<h3>.Chunk .d .by5</h3>
<div class="T-desc">Must be displayed as a five columns layout</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by5" style="background-color: gray;">
1
</div>
<div class="Chunk d by5" style="background-color: gray;">
2
</div>
<div class="Chunk d by5" style="background-color: gray;">
3
</div>
<div class="Chunk d by5" style="background-color: gray;">
4
</div>
<div class="Chunk d by5" style="background-color: gray;">
5
</div>
</div>
</div>
<h4>.Chunk .d .by5 .x2</h4>
<div class="T-desc">Must be displayed as a 2/5 column</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by5 x2" style="background-color: gray;">
1
</div>
<div class="Chunk d by5" style="background-color: cyan;">
Control block 1.
</div>
<div class="Chunk d by5" style="background-color: cyan;">
Control block 2.
</div>
<div class="Chunk d by5" style="background-color: cyan;">
Control block 3.
</div>
</div>
</div>
<h4>.Chunk .d .by5 .x3</h4>
<div class="T-desc">Must be displayed as a 3/5 column</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by5 x3" style="background-color: gray;">
1
</div>
<div class="Chunk d by5" style="background-color: cyan;">
Control block 1.
</div>
<div class="Chunk d by5" style="background-color: cyan;">
Control block 2.
</div>
</div>
</div>
<h4>.Chunk .d .by5 .x4</h4>
<div class="T-desc">Must be displayed as a 4/5 column</div>
<div class="T-sandbox">
<div class="Chunk">
<div class="Chunk d by5 x4" style="background-color: gray;">
1
</div>
<div class="Chunk d by5" style="background-color: cyan;">
Control block.
</div>
</div>
</div>
<h2>.cf</h2>
<div class="T-desc">Must wrap floated elements</div>
<div class="T-sandbox">
<div class="cf" style="background-color: gray;">
<div style="float: left; width: 150px;background-color: cyan;">
This (floated) cyan block should be contained entirely in a
gray block.
</div>
</div>
</div>
<h2>.hidden</h2>
<div class="T-desc">Must be hidden, no blank space</div>
<div class="T-sandbox">
<div class="hidden">
<span style="color: red;">
This block should be hidden.
</span>
</div>
</div>
</body>
</html>