-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
543 lines (519 loc) · 22.7 KB
/
index.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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Waffle</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="stylesheet" href="css/waffle.css" type="text/css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<div class="row no-wrap center intro">
<div class="unit">
<img src="img/bodyparts.jpg" alt="intro-img">
<h1>Waffle</h1>
<h2>The first cannibal (and lightweight) CSS framework based on inline-block</h2>
<p>Built with sweat and tears by <a href="https://twitter.com/scintillaluz">@Scintillaluz</a></p>
</div>
<div class="unit menu">
<a href="#the-basic-grid" class="button">The Basic Grid</a>
<a href="#waffle-grid" class="button">Waffle Grid System</a>
<a href="#play-with-grid" class="button">Play with the Grid</a>
<a href="#waffle-in-production" class="button">Waffle in Production</a>
</div>
</div>
<div class="row single-column about-waffle">
<div class="unit u-75">
<h3 class="title-chapter">About Waffle</h3>
<p class="description">Waffle is a simple, fully responsive and lightweight CSS framework built in Stylus, for building layouts without the hassle of clearing floats. There are two types of grids in Waffle, both sharing the same approach: horizontal blocks are called <code>.row</code>, and each <code>.row</code> can contain a multiple <code>.unit</code> blocks with diverse widths. By default each <code>.row</code> wrap itself on a maximum width defined by a <code>$width_layout</code> variable, here of 1180px. A <code>.wider</code> class applied to the <code>body</code> expand the maximum to 1600px for screens larger than 1800px. Once installed you can change these variables as you wish.</p>
<h4 class="subtitle-chapter">Testing and Issues</h4>
<p class="description">Waffle is based on <code>display: inline-block</code> so it is not supported by IE7. There's a <strong>whitespace</strong> issue with <code>inline-block</code>, that can be solved using <code>font-size: 0;</code> to avoid writing horrible markup with comment at every line ending. What I did was <strong>resetting the <code>font-size</code> to zero</strong> on every row, and assigning <code>font-size: 16px</code> on the <code>.unit</code> This has some fallbacks, since it's impossible to work with <code>em</code>s on classes on the <code>.row</code> (but hey, you can still use <code>rem</code>s). On the other side resetting the default type size at <code>.unit</code> level is helpful to not get lost in the <code>em</code>s inheriting madness.</p>
</div>
<div class="unit u-75 nested">
<div class="row center">
<div class="unit">
<a href="https://github.com/ScintillaLuz/waffle" target="_blank" class="button btn-red">view on github</a>
<a href="https://github.com/ScintillaLuz/waffle/archive/master.zip" class="button btn-blue">download .zip</a>
</div>
</div>
</div>
</div>
<div class="row single-column">
<div class="unit u-75">
<h3 id="the-basic-grid" class="title-chapter">The Basic Grid</h3>
<p class="description">This grid is directly inspired and expands <a href="http://cobyism.com/gridism/">Gridism</a> by Cobyism. I too believe that columns are counter-intuitive when designing an online page, so I borrowed this approach and worked with percentages. I've added a <code>.single-column</code> class for the <code>row</code> to use the units as single centered columns; it may be a bit "dirty" but I found out it's a good substitute for narrowing columns with padding. Plus, I make it stack nicely on mobile.</p>
</div>
</div>
<div class="row">
<div class="unit">
<div class="block">.unit <span class="extra-info">(default width is 100%)</span>
</div>
</div>
<div class="unit u-50">
<div class="block">
<span class="extra-info">.unit</span>.u-50
</div>
</div>
<div class="unit u-50">
<div class="block">
<span class="extra-info">.unit</span>.u-50
</div>
</div>
<div class="unit u-33">
<div class="block">
<span class="extra-info">.unit</span>.u-33
</div>
</div>
<div class="unit u-66">
<div class="block">
<span class="extra-info">.unit</span>.u-66
</div>
</div>
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-50">
<div class="block">
<span class="extra-info">.unit</span>.u-50
</div>
</div>
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-75">
<div class="block">
<span class="extra-info">.unit</span>.u-75
</div>
</div>
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-16">
<div class="block">
<span class="extra-info">.unit</span>.u-16
</div>
</div>
<div class="unit u-16">
<div class="block">
<span class="extra-info">.unit</span>.u-16
</div>
</div>
<div class="unit u-16">
<div class="block"><span class="extra-info">.unit</span>.u-16
</div>
</div>
<div class="unit u-16">
<div class="block">
<span class="extra-info">.unit</span>.u-16
</div>
</div>
<div class="unit u-33">
<div class="block">
<span class="extra-info">.unit</span>.u-33
</div>
</div>
</div>
<div class="row single-column">
<div class="unit u-66">
<div class="block">
.row.single-column<span class="extra-info"> .unit.u-66 (quick and dirty single centered columns)</span>
</div>
</div>
</div>
<div class="row single-column">
<div class="unit u-75">
<h3 id="waffle-grid" class="title-chapter">Waffle Grid System</h3>
<p class="description">Here comes the juicy part. The <code>split</code> system is based on the idea that the the parent–the <code>.row</code>–is telling the children–the <code>.unit</code>s contained in the row–how to behave. So a <code>.split3</code> applied to the <code>.row</code> means that at its largest width the layout is evenly divided in three parts. And so goes on with <code>.split4</code> <code>.split5</code> and <code>.split6</code>. This way I can easily govern the <code>.unit</code>s with the media queries; as you can see playing with the viewport, a <code>.split4</code>, for example, is composed of 4 columns at full width, 3 columns at 800px width, and goes down to 2 columns on mobiles. My idea was to have all the splits stacking on two columns on mobiles. If you don't like that, you can add a <code>.one-column-phones</code> class on the <code>.row</code> after the <code>split</code> to stack on a single column.</p>
</div>
</div>
<div class="row split3">
<div class="unit">
<div class="block">
.row.split3 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split3 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split3 <span class="extra-info">.unit</span>
</div>
</div>
</div>
<div class="row split4">
<div class="unit">
<div class="block">
.row.split4 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split4 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split4 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split4 <span class="extra-info">.unit</span>
</div>
</div>
</div>
<div class="row split5">
<div class="unit">
<div class="block">
.row.split5 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split5 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split5 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split5 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split5 <span class="extra-info">.unit</span>
</div>
</div>
</div>
<div class="row split6">
<div class="unit">
<div class="block">
.row.split6 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split6 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split6 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split6 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split6 <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
.row.split6 <span class="extra-info">.unit</span>
</div>
</div>
</div>
<div class="row split4 one-column-phones">
<div class="unit">
<div class="block">
<span class="extra-info">
.row.split4</span>.one-column-phones <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">
.row.split4</span>.one-column-phones <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">
.row.split4</span>.one-column-phones <span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">
.row.split4</span>.one-column-phones <span class="extra-info">.unit</span>
</div>
</div>
</div>
<div class="row">
<div class="unit">
<h4 class="subtitle-chapter">Gridception</h4>
</div>
</div>
<div class="row">
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-75 nested">
<div class="row">
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-25">
<div class="block">
<span class="extra-info">.unit</span>.u-25
</div>
</div>
<div class="unit u-75">
<div class="block">
<span class="extra-info">.unit</span>.u-75
</div>
</div>
<div class="unit u-50">
<div class="block">
<span class="extra-info">.unit</span>.u-50
</div>
</div>
<div class="unit u-50">
<div class="block">
<span class="extra-info">.unit.u-50</span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="unit">
<h4 class="subtitle-chapter">Gridception with a split</h4>
</div>
</div>
<div class="row">
<div class="unit u-25">
<div class="block"><span class="extra-info">.unit</span>.u-25</div>
</div>
<div class="unit u-75 nested">
<div class="row split3">
<div class="unit">
<div class="block">
<span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">.unit</span>
</div>
</div>
<div class="unit">
<div class="block">
<span class="extra-info">.unit</span>
</div>
</div>
</div>
</div>
</div>
<div class="row single-column">
<div class="unit u-75">
<h3 id="play-with-grid" class="title-chapter">Play with the Grid</h3>
<p class="description">Let's have fun with utility classes; don't like gutters? Remove them with <code>.no-gutters</code> on the row. Two classes help you resetting annoying styles for lists: <code>.reset-list</code> <strong>removes margin, padding and style</strong> from any <code>ul</code>; <code>.menu-list</code> extends <code>.reset-list</code> adding a <code>display: inline-block</code> for horizontal menus/tags. Four classes help you showing/hiding elements for responsive use: <code>.no-desktop</code> <code>.no-phone</code> <code>.only-desktop</code> <code>.only-phone</code></p>
<p class="description">What I used down here in this fake-gallery it's a good solution to avoid using floats for positioning elements such as navs. Use <code>.row.justify</code> and two <code>.unit</code>s inside: see the tags and the arrows below; works nicely with absolute positioning (text attributes to arrange elements? Yes, but it's CSS, I cannot be too picky).</p>
</div>
</div>
<div class="row justify only-desktop">
<div class="unit tags">
<ul class="menu-list">
<li class="title-menu">
<a href="" class="button btn-small"><i class="fa fa-tags"></i> Pick a Dish!</a>
</li>
<li class="dish">
<a href="" class="button btn-small btn-light-blue"><i class="fa fa-close"></i> Know-it-all Girl Head</a>
</li>
<li class="dish">
<a href="" class="button btn-small btn-light-blue"><i class="fa fa-close"></i> Hairy Legs</a>
</li>
<li class="dish">
<a href="" class="button btn-small btn-light-blue"><i class="fa fa-close"></i> Guilty Guy Head</a>
</li>
<li class="dish">
<a href="" class="button btn-small btn-light-blue"><i class="fa fa-close"></i> Macho Arms</a>
</li>
<li class="dish">
<a href="" class="button btn-small btn-light-blue"><i class="fa fa-close"></i> Smelly Feet</a>
</li>
</ul>
</div>
<div class="unit">
<a href="mailto:poferopuffo@gmail.com" class="button btn-small btn-light-red">Complain with the Owner</a>
</div>
</div>
<div class="row cannibal-dishes only-desktop">
<div class="unit nested navigation">
<div class="row justify">
<div class="unit">
<div class="nav left">
<i class="fa fa-angle-left"></i>
</div>
</div>
<div class="unit">
<div class="nav right">
<i class="fa fa-angle-right"></i>
</div>
</div>
</div>
</div>
<div class="unit nested">
<div class="row split6 img-container">
<div class="unit">
<a href="">
<img src="img/01-girl-head.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/05-guy-legs.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/03-girl-arms.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/02-guy-head.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/04-guy-arms.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/06-girl-legs.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/04-guy-arms.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/06-girl-legs.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/03-girl-arms.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/02-guy-head.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/01-girl-head.jpg" alt="">
</a>
</div>
<div class="unit">
<a href="">
<img src="img/05-guy-legs.jpg" alt="">
</a>
</div>
</div>
</div>
</div>
<div class="row single-column">
<div class="unit u-75">
<h3 id="waffle-in-production" class="title-chapter">Waffle in Production</h3>
<p class="description">I've used <strong>Waffle</strong> on two different projects: <a href="https://devcharm.com">Devcharm</a>, a free and open library of resources about webdevelopment; and <a href="http://isoverse.us">Isoverse</a>, a publishing plaform for hosting a portfolio using Dropbox. Isoverse is running on the last version of Waffle, and I've been correcting this framework while working on Isoverse's static site and the theme templates we offer.</p>
</div>
</div>
<div class="row no-wrap center fork">
<div class="unit">
<h3 class="title">Fork me!</h3>
</div>
<div class="unit nested">
<div class="row single-column">
<div class="unit u-75">
<p class="description">I'm eager to receive <strong>pull requests</strong> and improve Waffle. It would actually be awesome to have Less and Sass versions. Waffle is open source and released under a MIT Licence.</p>
</div>
</div>
</div>
<div class="unit get-waffle">
<a href="https://github.com/ScintillaLuz/waffle" target="_blank" class="button btn-red">view on github</a>
<a href="https://github.com/ScintillaLuz/waffle/archive/master.zip" class="button btn-blue">download .zip</a>
</div>
</div>
<footer class="row no-wrap">
<div class="unit nested">
<div class="row justify content">
<div class="unit">
<p>2014 <a href="https://twitter.com/scintillaluz">Scintillaluz</a> with many thanks to <a href="https://twitter.com/vrde">vrde</a>, <a href="https://twitter.com/ilwcss">marv</a> and <a href="https://twitter.com/danilapellicani">danila</a></p>
</div>
<div class="unit no-phone">
<p>No guys or girls were harmed to build this framework.</p>
</div>
</div>
</div>
</footer>
</body>
</html>