/
index.html
executable file
·622 lines (493 loc) · 21.2 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
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - The HTML Presentation Framework</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/league.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<section>
<h1>It's not the <i>size unit</i> that counts...</h1>
</section>
</section>
<section>
<section>
<h2>(Quick)<br/>About Me</h2>
</section>
<section>
<h3>Jamieson Roberts</h3>
<p>
On twitter and most digital platforms I'm <a href="http://twitter.com/jamiesonroberts">@JamiesonRoberts</a>
</p>
<p style="font-size:1.5em;">&</p>
<p>
On most gaming platforms I'm Jedispara
</p>
</section>
<section data-background="#FFF">
<img src="./images/jr-badge-logo-large.png" style="max-width: 50%; max-height: 50%; border: none; box-shadow: none;" />
</section>
<section data-background="#FFF">
<img src="./images/MLD-Colour-web.jpg" style="max-width: 50%; max-height: 50%; border: none; box-shadow: none; float: left;" />
<img src="./images/ttl-western-logo-trans.gif" style="max-width: 50%; max-height: 50%; border: none; box-shadow: none; float: right" />
</section>
<section data-background="#FFF">
<img src="./images/arcane.png" style="max-width: 50%; max-height: 50%; border: none; box-shadow: none;" />
</section>
</section>
<section>
<section>
<h2>(Quick) <br/>Shameless Plug Time</h2>
</section>
<section>
<p>
<img src="./images/pp-weblogo.png" style="max-width: 50%; max-height: 50%; border: none; box-shadow: none;" />
</p>
<strong>October 18th at the Convention Center</strong>
</section>
</section>
<!-- Example of nested vertical slides -->
<section data-background="http://i.giphy.com/13HKfgAmdbYZCE.gif">
<h2>So lets dive in</h2>
<h3>And head back in time and</h3>
<p>go to the start of typography and typographical units</p>
</section>
<section>
<section data-background="./images/luttrellsupper-ts.jpg">
<h2 class="fragment" style="background-color: rgba(0, 0, 0, 0.9);">Maybe not that far back...</h2>
<h3 class="fragment" style="background-color: rgba(0, 0, 0, 0.9); margin-top:10px;">But futher than you think.</h3>
</section>
<section data-background="http://i.giphy.com/aaoSHuo6VVmeY.gif">
<h2>1783<br/> <br/> </h2>
</section>
</section>
<section>
<section>
<h2>François-Ambroise Didot</h2>
<aside class="notes">
invented a new printing-press<br/>
improved type-founding<br/>
and was the first to print on vellum paper.
whats more important about this budding industrialist
</aside>
</section>
<section>
<h2>Didot point system</h2>
<p>which goes a bit like this...</p>
<p><span class="fragment">1 point = </span><span class="fragment"> 1 ⁄ 12 cicero = </span><span class="fragment">1 ⁄ 72 French Royal inch</span></p>
<p><span class="fragment">1 cicero (pica) = </span><span class="fragment"> 12 Didot points </span><span class="fragment">1 ⁄ 6 French Royal inch</span></p>
</section>
</section>
<section>
<section data-background="http://i.giphy.com/zxuSVrPPvNTAA.gif">
<h2>Lets jump forward to the 1870's</h2>
<p class="fragment">Nothing had been standardized, but lots of proposals for one</p>
</section>
<section>
<h2>American Point System</h2>
<p class="fragment">Which is pretty much the Didot point system...</p>
<p class="fragment">except they couldn't decide who's inch was the right one...</p>
<p class="fragment">so they made shit up.</p>
<p class="fragment">Sensing a trend?</p>
</section>
<section>
<h2>American Point System</h2>
<p><span class="fragment">1 point = </span><span class="fragment"> 1 ⁄ 12 Johnson Pica = </span><span class="fragment">exactly 0.013 83 inch</span></p>
<p><span class="fragment">1 Johnson pica = </span><span class="fragment">exactly 0.1660 inch</span><span class="fragment"> (pretty much 1 /6th of an inch)</span></p>
</section>
</section>
<section>
<h2>The really wild part</h2>
<p class="fragment">12 dd (that really weird 1 /6 of a French Royal Inch)</p>
<p class="fragment">Still comes out almost identically to 12pt printed font.</p>
<p class="fragment">But I'm getting ahead of myself</p>
</section>
<section data-background="http://i.giphy.com/FIYFpEYqo6b3a.gif">
<h2>Ok, cool and all...</h2>
<p class="fragment">But wtf does this have to do with dev?</p>
</section>
<section>
<h2>Everything</h2>
<p class="fragment">... to do with absolute length units.</p>
<p class="fragment">Or atleast their ratios.</p>
</section>
<section>
<table class="data">
<thead>
<tr>
<th>unit
</th><th>name
</th><th>equivalence
</th></tr></thead><tbody class="fragment">
<tr>
<th><dfn data-dfn-type="dfn" data-export="" id="in">in<a class="self-link" href="#in"></a></dfn>
</th><td>inches
</td><td>1in = 2.54cm = 96px
</td></tr><tr>
<th><dfn data-dfn-type="dfn" data-export="" id="pc">pc<a class="self-link" href="#pc"></a></dfn>
</th><td>picas
</td><td>1pc = 1/6th of 1in
</td></tr><tr>
<th><dfn data-dfn-type="dfn" data-export="" id="pt">pt<a class="self-link" href="#pt"></a></dfn>
</th><td>points
</td><td>1pt = 1/72th of 1in
</td></tr>
</tbody>
<tbody class="fragment">
<tr>
<th><dfn data-dfn-type="dfn" data-export="" data-lt="px|pixel unit" id="px">px<a class="self-link" href="#px"></a></dfn>
</th><td>pixels
</td><td>1px = 1/96th of 1in
</td></tr>
</tbody>
<tbody class="fragment">
<tr>
<th><dfn data-dfn-type="dfn" data-export="" id="cm">cm<a class="self-link" href="#cm"></a></dfn>
</th><td>centimeters
</td><td>1cm = 96px/2.54
</td></tr><tr>
<th><dfn data-dfn-type="dfn" data-export="" id="mm">mm<a class="self-link" href="#mm"></a></dfn>
</th><td>millimeters
</td><td>1mm = 1/10th of 1cm
</td></tr><tr>
<th><dfn data-dfn-type="dfn" data-export="" id="q">q<a class="self-link" href="#q"></a></dfn>
</th><td>quarter-millimeters
</td><td>1q = 1/40th of 1cm
</td></tr>
</tbody></table>
</section>
<section>
<section>
<h3>And here is where things get really skrewed up</h3>
<p class="fragment">An inch doens't always equal an inch:</p>
<p class="fragment">Pixels are dependant on the size of the "inch"</p>
<p class="fragment">or an "inch" are relative to a pixel.</p>
</section>
<section data-background="http://i.giphy.com/4fsaueq5lCV4A.gif">
<h3>Lo-Res Screens</h3>
</section>
<section>
<p class="fragment">The unit "px" is reference to a physical pixel</p>
<p class="fragment">so an inch is 96 reference pixels in size<br/></p>
<p class="fragment">and all other absolute length units adjust accordingly</p>
</section>
<section data-transition="zoom" data-background="http://i.giphy.com/e7FOBuKCDtwWI.gif">
<h3>Hi-Res Screens or Physical item</h3>
</section>
<section>
<p class="fragment">The "inch" is defined by its physical size, so...</p>
<p class="fragment">an inch is an inch</p>
<p class="fragment">a pixel is 1 / 96th of an inch</p>
<p class="fragment">a point is 1 / 72th of an inch</p>
<p class="fragment">and a pica is 1 / 6th of an inch</p>
<small class="fragment">Just like the APS or DPS</small>
</section>
</section>
<section>
<h2>And this is just 1 type of unit size</h2>
<h2 class="fragment">of 6.</h2>
<p class="fragment">Don't worry, most are digital constructions.</p>
</section>
<section>
<section data-background="http://i.giphy.com/Nrwd82CALDeRW.gif">
<h2 style="color: #000;">Relative Lengths</h2>
</section>
<section>
<h3>There are 2 types:</h3>
<p class="fragment">Font-relative Lengths</p>
<p class="fragment">Viewport-percentage Lengths</p>
</section>
</section>
<section>
<section>
<h2>Font-relative Lengths</h2>
<p class="fragment">EM, REM<sup>*</sup>, CH, EX</p>
<p class="fragment">All except for REM's are relative to the font metric of the element they are applied to</p>
</section>
<section>
<table class="data">
<thead>
<tr>
<th>unit
</th><th>relative to
</th></tr></thead><tbody>
<tr>
<td><span class="css">em</span>
</td><td>font size of the element
</td></tr><tr>
<td><span class="css">ex</span>
</td><td>x-height of the element’s font
</td></tr><tr>
<td><span class="css">ch</span>
</td><td>width of the "0" (ZERO, U+0030) glyph in the element’s font
</td></tr><tr>
<td><span class="css">rem</span>
</td><td>font size of the root element
</td></tr></tbody></table>
<aside class="notes">give examples of each one</aside>
</section>
</section>
<section>
<section>
<h2>Viewport-relative Lengths</h2>
<p class="fragment">VH, VW, VMIN, VMAX</p>
</section>
<section>
<table class="data">
<thead>
<tr>
<th>unit
</th><th>relative to
</th></tr></thead><tbody>
<tr>
<td><span class="css">vw</span>
</td><td>1% of viewport’s width
</td></tr><tr>
<td><span class="css">vh</span>
</td><td>1% viewport’s height
</td></tr><tr>
<td><span class="css">vmin</span>
</td><td>1% of viewport’s smaller dimension
</td></tr><tr>
<td><span class="css">vmax</span>
</td><td>1% of viewport’s larger dimension
</td></tr></tbody></table>
<aside class="notes">vw unit
Equal to 1% of the width of the initial containing block.
In the example below, if the width of the viewport is 200mm, the font size of h1 elements will be 16mm (i.e. (8×200mm)/100).
h1 { font-size: 8vw }
vh unit
Equal to 1% of the height of the initial containing block.
vmin unit
Equal to the smaller of vw or vh.
vmax unit
Equal to the larger of vw or vh.
</aside>
</section>
</section>
<section>
<h3>So now that we know all that</h3>
<p class="fragment">Can we all agree that these absolute units of size are actually pretty terrible for web. But great for print.</p>
<p class="fragment">That aside: lets go over some examples</p>
</section>
<section>
<section>
<h3>Where pixels and the like break down for web</h3>
<pre class="fragment">@media all and (min-width: 768px)</pre>
<p> ≠ </p>
<pre class="fragment">@media all and (min-width: 48em)</pre>
<p class="fragment">Let me explain why</p>
</section>
<section>
<h3>@media all and (min-width: 768px)</h3>
<p class="fragment">Will still = true if you increase your browser magnification (read font size)</p>
<p class="fragment">Because the actual number of pixels of the window haven't changed in relation to the font size increase</p>
</section>
<section>
<h3>@media all and (min-width: 48em)</h3>
<p class="fragment">Won't.</p>
<p class="fragment">Because the actual number of EM's of screen real estate across the screen won't evaluate to true if you increase the font size.</p>
</section>
</section>
<section>
<section>
<h2>EM's vs REM's</h2>
<p class="fragment">Why you should care about the difference</p>
<p class="fragment">EM's are relative to the font size of the element or the last parent element with a specified font size</p>
<p class="fragment">As you increase the font size, all other EM measurements increase proportionally</p>
<aside class="notes">Which is great when you want to maintain padding, borders, image sizes relative to a single element</aside>
</section>
<section>
<h2>REM's? <br /><small>The red-headed step child</small></h2>
<p class="fragment">Are relational in size to the root elements size (ie HTML tag)</p>
<p class="fragment">Meaning if you increase the font size of the text, the padding of the element will still be the same and its overall size will be as well... just with bigger letters in it.</p>
</section>
<section>
<h2>It all comes down to inheritance</h2>
<p>Each have a use case, depending on how you want things to inherit sizing</p>
<p class="fragment">Or weird fonts.</p>
<p class="fragment">Or better yet multiple fonts with different baseline sizes.</p>
</section>
</section>
<section>
<section>
<h3>Viewport relative sizing</h3>
<p class="fragment">Really sweet units that gets no love</p>
<p class="fragment">Only thing missing is IE8 support</p>
<p class="fragment">But VH and VW are supported on IE9 forward</p>
</section>
</section>
<section>
<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">ems/rems are meaningful self-determined measurements, while px are an unrelated external abstraction that probably defy conventions</p>— Damon Muma (@thedamon) <a href="https://twitter.com/thedamon/status/644894284433326080">September 18, 2015</a></blockquote>
<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">it's like measuring a new table leg w a ruler vs measuring it against the rest of the table like they did in the old days</p>— Damon Muma (@thedamon) <a href="https://twitter.com/thedamon/status/644894540306890752">September 18, 2015</a></blockquote>
</section>
<section>
<section data-background="http://i.giphy.com/11FRmJRii0I8iA.gif">
</section>
<section>
<h2>There's more!</h2>
<p class="fragment">Remember how I said there was a total of 6 unit lengths?</p>
<p class="fragment">Here are the other types</p>
</section>
</section>
<section>
<section data-background="http://i.giphy.com/pRqK2YcBYQp0s.gif">
<h3>Angle Units</h3>
</section>
<section>
<h3>Different ways of measuring a circle</h3>
<table class="data fragment">
<thead>
<tr>
<th>unit
</th><th>dimensions
</th></tr></thead><tbody>
<tr>
<td><span class="css">deg</span>
</td><td>360 degree's in a cirlce
</td></tr><tr>
<td><span class="css">grad</span>
</td><td>400 gradians (grades) in a cirlce
</td></tr><tr>
<td><span class="css">rad</span>
</td><td>2π radians in a full circle
</td></tr><tr>
<td><span class="css">turn</span>
</td><td>1 turn in a full circle.
</td></tr></tbody></table>
</section>
</section>
<section>
<section data-background="http://i.giphy.com/M9zaOuiElVvTG.gif">
<h3>Duration Units</h3>
</section>
<section>
<h3>Different ways of measuring time</h3>
<table class="data fragment">
<thead>
<tr>
<th>unit
</th><th>dimensions
</th></tr></thead><tbody>
<tr>
<td><span class="css">s</span>
</td><td>Seconds
</td></tr><tr>
<td><span class="css">ms</span>
</td><td>Milliseconds - 1000 per second
</td></tr></tbody></table>
</section>
</section>
<section>
<section data-background="http://i.giphy.com/12Yf5CuhUpjDG0.gif">
<h3 style="color: #000;">Frequency Units<sup>*</sup></h3>
<p class="fragment" style="color: #000;">They are in CSS3, but nothing currently uses them.</p>
</section>
<section>
<table>
<thead>
<tr>
<th>unit
</th><th>dimensions
</th></tr></thead><tbody>
<tr>
<td><span class="css">Hz</span>
</td><td>Number of occurrences per second.
</td></tr><tr>
<td><span class="css">kHz</span>
</td><td>1000 Hz
</td></tr></tbody></table>
</section>
</section>
<section>
<section data-background="http://i.giphy.com/Eg7Zder9Vj89q.gif">
<h3 style="background-color:#000;">Resolution Units</h3>
</section>
<section>
<h3>Different ways of measuring resolution</h3>
<p class="fragment">Representing how many dots fit in a CSS PX, IN, or CM.</p>
<table class="data fragment">
<thead>
<tr>
<th>unit
</th><th>dimensions
</th></tr></thead><tbody>
<tr>
<td><span class="css">DPI</span>
</td><td>Dots per inch
</td></tr><tr>
<td><span class="css">DPCM</span>
</td><td>Dots per cm
</td></tr><tr>
<td><span class="css">DPPX</span>
</td><td>Dots per 'px unit'
</td></tr></tbody></table>
</section>
<section>
<h2>Dots per px unit?</h2>
<p class="fragment">Remember in CSS 1in = 96px</p>
<p class="fragment">ish</p>
<p class="fragment">So...</p>
<pre class="fragment">@media all and (min-resolution: 2dppx)</pre>
<p class="fragment">Would target devices with a resolution higher than 'normal' 96 DPI or 1DPPX</p>
</section>
</section>
<section>
<h2>Q/A & Discussion</h2>
</section>
<section>
<h1>It's not the <i>size unit</i> that counts...</h1>
</section>
<section style="text-align: left;">
<h1>...It's how you use it.</h1>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>