-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.html
420 lines (397 loc) · 12.2 KB
/
docs.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
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<link rel="stylesheet" href="grid.css">
<link rel="stylesheet" href="./demo.css">
</head>
<body>
<header >
<div class='container'>
<div class='row large-gutter'>
<div class='small-12 medium-8'>
<h1><em>Funko</em><br/> Grid System</h1>
<h2><a >documentation</a></h2>
<h2><a href='https://github.com/OriginalFunko/funko-grid'>source</a></h2>
<h2><a href='index.html'>demo</a></h2>
</div>
<div>
<h1>index</h1>
<nav>
<h2><a href='#Gutters'>Gutters</a></h2>
<h2><a href='#GridSystem'>Grid System</a></h2>
<h2><a href='#Utilities'>Utilities</a></h2>
</nav>
</div>
</div>
</div>
</header>
<div class='container'>
<a name='Gutters'></a>
<h1>Gutters</h1>
<p>gutters are applied to row elements and specify how much space is placed between cells</p>
<h2>no gutter</h2>
<div class='row'>
<pre class='small-12'>
<div class='row <strong>no-gutter</strong>'>
<div></div>
<div></div>
<div></div>
</div>
</pre>
</div>
<div class='row no-gutter'>
<div> </div>
<div> </div>
<div> </div>
</div>
<hr/>
<h2>small gutter</h2>
<div class='row'>
<pre class='small-12'>
<div class='row <strong>small-gutter</strong>'>
<div></div>
<div></div>
<div></div>
</div>
</pre>
</div>
<div class='row small-gutter'>
<div> </div>
<div> </div>
<div> </div>
</div>
<hr/>
<h2>medium gutter</h2>
<p>medium is the default. no class is required.</p>
<div class='row'>
<pre class='small-12'>
<div class='row'>
<div></div>
<div></div>
<div></div>
</div>
</pre>
</div>
<div class='row'>
<div> </div>
<div> </div>
<div> </div>
</div>
<hr/>
<h2>large gutter</h2>
<div class='row'>
<pre class='small-12'>
<div class='row <strong>large-gutter</strong>'>
<div></div>
<div></div>
<div></div>
</div>
</pre>
</div>
<div class='row large-gutter'>
<div> </div>
<div> </div>
<div> </div>
</div>
<hr/>
<a name='GridSystem'></a>
<h1>Grid System</h1>
<h2>basics</h2>
<p>
If you just want even width columns, flex box will handle most of the drudgery for you.
just add '<strong>row</strong>' to a containing element's class list and you're done.
</p>
<div class='row'>
<pre class='small-12'>
<div class='<strong>row</strong>'>
<div></div>
<div></div>
</div>
<div class='row'>
<div></div>
<div></div>
<div></div>
</div>
<div class='row'>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</pre>
</div>
<div class='row'>
<div> </div>
<div> </div>
</div>
<div class='row'>
<div> </div>
<div> </div>
<div> </div>
</div>
<div class='row'>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
</div>
<hr/>
<h2>controlled grid</h2>
<p>
to specify the width of a given cell, specify the width in number of columns (out of 12) using the class name '<strong>small-x</strong>', where x is the number of columns.
</p>
<p>
HINT: When you specify the column width, you don't need to close the row tag and open another. the system will wrap the cells in increments of 12.
</p>
<p>
HINT: You can mix controlled and un-controlled cells within a row.
</p>
<p>
<em>
Why '<strong>small</strong>'? - small is the default class for column widths for mobile, which can then be overridden with specified widths for tablet and desktop.
We'll cover this in the next section.
</em>
</p>
<div class='row'>
<pre class='small-12'>
<div class='row'>
<div class='<strong>small-6</strong>'></div>
<div class='small-2'></div>
<div class='small-2'></div>
<div class='small-2'></div>
<div class='small-8'></div>
<div class='small-4'></div>
</div>
<div class='row'>
<div class='<strong>small-6</strong>'></div>
<div></div>
<div></div>
</div>
</pre>
</div>
<div class='row'>
<div class='small-6'> </div>
<div class='small-2'> </div>
<div class='small-2'> </div>
<div class='small-2'> </div>
<div class='small-8'> </div>
<div class='small-4'> </div>
</div>
<div class='row'>
<div class='small-6'> </div>
<div> </div>
<div> </div>
</div>
<hr/>
<h2>responsive grid</h2>
<p>
this system provides three breakpoints - small, medium, and large. roughly: mobile, tablet and desktop.
use the classes '<strong>small-x</strong>', '<strong>medium-x</strong>' and '<strong>large-x</strong>' to specify the column widths of an element for each breakpoint.
</p>
<div class='row'>
<pre class='small-12'>
<div class='row'>
<div class='<strong>small-12 medium-6 large-3</strong>'></div>
<div class='small-12 medium-6 large-3'></div>
<div class='small-12 medium-6 large-3'></div>
<div class='small-12 medium-6 large-3'></div>
<div class='small-2 medium-1'></div>
<div class='small-4 medium-2'></div>
<div class='small-6 medium-3'></div>
<div class='small-6 medium-3'></div>
<div class='small-4 medium-2'></div>
<div class='small-2 medium-1'></div>
</div>
</pre>
</div>
<div class='row'>
<div class='small-12 medium-6 large-3'> </div>
<div class='small-12 medium-6 large-3'> </div>
<div class='small-12 medium-6 large-3'> </div>
<div class='small-12 medium-6 large-3'> </div>
<div class='small-2 medium-1'> </div>
<div class='small-4 medium-2'> </div>
<div class='small-6 medium-3'> </div>
<div class='small-6 medium-3'> </div>
<div class='small-4 medium-2'> </div>
<div class='small-2 medium-1'> </div>
</div>
<hr/>
<h2>offsets</h2>
<p>
to specify the left offset of a given cell, use '<strong>offset-[screen size]-x</strong>', where x is the number of columns 0-12.
</p>
<p>
HINT: you might need '<strong>offset-medium-0</strong>' or '<strong>offset-large-0</strong>' to reset a cells offset when using '<strong>offset-small-x</strong>'
</p>
<div class='row'>
<pre class='small-12'>
<div class='row '>
<div class='small-4 <strong>offset-small-8</strong>'>offset 8</div>
<div class='small-8 offset-small-4'>offset 4</div>
<div class='small-12 '>offset 0</div>
</div>
</pre>
</div>
<div class='row '>
<div class='small-4 offset-small-8'>offset 8</div>
<div class='small-8 offset-small-4'>offset 4</div>
<div class='small-12 '>offset 0</div>
</div>
<hr/>
<h2>nesting</h2>
<p>
this is cake. each cell can in turn also be a row. just add '<strong>row</strong>' and you're done. Within a cell, the 12 column system resets.
</p>
<div class='row'>
<pre class='small-12'>
<div class='row'>
<div class='small-12 medium-6 <strong>row</strong>'>
<div class='small-6'></div>
<div ></div>
<div ></div>
</div>
<div class='small-12 medium-6 row'>
<div class='small-8 row'>
<div></div>
<div></div>
</div>
<div class='small-4 row'>
<div></div>
</div>
</div>
</div>
</pre>
</div>
<div class='row'>
<div class='small-12 medium-6 row'>
<div class='small-6'> </div>
<div > </div>
<div > </div>
</div>
<div class='small-12 medium-6 row'>
<div class='small-8 row'>
<div> </div>
<div> </div>
</div>
<div class='small-4 row'>
<div> </div>
</div>
</div>
</div>
<hr/>
<h2>row spanning</h2>
<p>
this is a tiny bit tricky. what we're actually doing is <em>visually</em> promoting child cells to sibling cells.
To accomplish this, we remove the padding of the nested row which contains the promoted cells by adding the class '<strong>no-row-padding</strong>'.
</p>
<div class='row'>
<pre class='small-12'>
<div class='row'>
<div class='small-4 row'>spans 3 rows</div>
<div class='small-8 row <strong>no-row-padding</strong>'>
<div class='small-12'></div>
<div class='small-12'></div>
<div class='small-12'></div>
</div>
</div>
</pre>
</div>
<div class='row'>
<div class='small-4 row'>spans 3 rows</div>
<div class='small-8 row no-row-padding'>
<div class='small-12'> </div>
<div class='small-12'> </div>
<div class='small-12'> </div>
</div>
</div>
<hr/>
<a name='Utilities'></a>
<h1>Utilities</h1>
<h2>no-cell-padding</h2>
<div class='row'>
<pre class='small-12'>
<div class='row'>
<div class='<strong>no-cell-padding</strong>'>no cell padding</div>
<div class='<strong>no-cell-padding</strong>'>no cell padding</div>
<div class='<strong>no-cell-padding</strong>'>no cell padding</div>
</div>
</pre>
</div>
<div class='row'>
<div class='no-cell-padding'>no cell padding</div>
<div class='no-cell-padding'>no cell padding</div>
<div class='no-cell-padding'>no cell padding</div>
</div>
<hr/>
<h2>hide-for-x, show-for-x</h2>
<div class='row'>
<pre class='small-12'>
<div class='row'>
<div class='<strong>hide-for-small</strong>'>this is <strong>not</strong> visible on small</div>
<div class='hide-for-medium'>this is <strong>not</strong> visible on medium</div>
<div class='hide-for-large'>this is <strong>not</strong> visible on large</div>
<div class='<strong>show-for-small</strong>'>this is <strong>only</strong> visible on small</div>
<div class='show-for-medium'>this is <strong>only</strong> visible on medium</div>
<div class='show-for-large'>this is <strong>only</strong> visible on large</div>
</div>
</pre>
</div>
<div class='row'>
<div class='hide-for-small'>this is <strong>not</strong> visible on small</div>
<div class='hide-for-medium'>this is <strong>not</strong> visible on medium</div>
<div class='hide-for-large'>this is <strong>not</strong> visible on large</div>
<div class='show-for-small'>this is <strong>only</strong> visible on small</div>
<div class='show-for-medium'>this is <strong>only</strong> visible on medium</div>
<div class='show-for-large'>this is <strong>only</strong> visible on large</div>
</div>
<hr/>
<h2>order-[screen size]-[position]</h2>
<p>flex box allows you to re-order elements as they're displayed without altering their order within the markup.</p>
<p>this system provides some convenience methods changing the order of items for a given screen size</p>
<p>use the class name '<strong>order-[screen size]-[position]</strong>' where 'position' is a number 1 through 12.</p>
<div class='row'>
<pre class='small-12'>
<div class='row'>
<div class='<strong>order-large-1 order-medium-2 order-small-3</strong>'>
large: first<br/>
medium: second<br/>
small: third<br/>
</div>
<div class='order-large-2 order-medium-3 order-small-1'>
large: second<br/>
medium: third<br/>
small: first<br/>
</div>
<div class='order-large-3 order-medium-1 order-small-2'>
large: third<br/>
medium: first<br/>
small: second<br/>
</div>
</div>
</pre>
</div>
<div class='row'>
<div class='order-large-1 order-medium-2 order-small-3'>
<strong>A</strong><br/>
large: first<br/>
medium: second<br/>
small: third<br/>
</div>
<div class='order-large-2 order-medium-3 order-small-1'>
<strong>B</strong><br/>
large: second<br/>
medium: third<br/>
small: first<br/>
</div>
<div class='order-large-3 order-medium-1 order-small-2'>
<strong>C</strong><br/>
large: third<br/>
medium: first<br/>
small: second<br/>
</div>
</div>
</div>
</body>
</html>