This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boilerplate.html
404 lines (367 loc) · 16.7 KB
/
boilerplate.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<title>Your deck.js Presentation</title>
<!-- Required stylesheet -->
<link rel="stylesheet" href="core/deck.core.css">
<!-- Extension CSS files go here. Remove or add as needed. -->
<link rel="stylesheet" media="screen" href="extensions/goto/deck.goto.css">
<link rel="stylesheet" media="screen" href="extensions/menu/deck.menu.css">
<link rel="stylesheet" media="screen" href="extensions/navigation/deck.navigation.css">
<link rel="stylesheet" media="screen" href="extensions/status/deck.status.css">
<!-- <link rel="stylesheet" media="screen" href="extensions/scale/deck.scale.css"> -->
<link rel="stylesheet" href="css/app.css">
<!-- Style theme. More available in /themes/style/ or create your own. -->
<!--<link rel="stylesheet" media="screen" href="themes/style/web-2.0.css">-->
<!-- Transition theme. More available in /themes/transition/ or create your own. -->
<!--<link rel="stylesheet" media="screen" href="themes/transition/horizontal-slide.css">-->
<!-- Basic black and white print styles -->
<link rel="stylesheet" media="print" href="core/print.css">
<script src="//use.typekit.net/zsm3oju.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
<!-- Required Modernizr file -->
<script src="modernizr.custom.js"></script>
</head>
<body>
<div class="deck-container">
<!-- Begin slides. Just make elements with a class of slide. -->
<section class="slide" id="who-am-i">
<h1>Samuel Allen</h1>
<h2>Senior Interactive Developer - Isobar, Chicago</h2>
<h3>Email</h3>
<p><a href="mailto:sam.allen@isobar.com">sam.allen@isobar.com</p>
<h3>LinkedIn</h3>
<p><a href="https://www.linkedin.com/in/dehuszar">https://www.linkedin.com/in/dehuszar</a></p>
<h3>Twitter</h3>
<p><a href="https://twitter.com/dehuszar">@dehuszar</a></p>
</section>
<section class="slide" class="talk-structure">
<h1>Semantic Remapping with CSS Processors</h1>
<ul>
<li class="slide">What is it?</li>
<li class="slide">What do we have now?</li>
<li class="slide">So why is this still hard then?</li>
<li class="slide">How can we do better?</li>
</ul>
</section>
<section class="slide" id="tldr-what-is-it">
<h1>What is it, and why should I care?</h1>
<dl>
<dt>Semantic Remapping</dt>
<dd class="slide">A way of organizing & applying reusable visual patterns <span class="slide">to semantically appropriate markup and classes that <strong>describe the content</strong></span><span class="slide">, not the content's desired visual outcome</span></dd>
</dl>
<div class="so-what-wrapper">
<div class="details">
<h2 class="slide">And that gets us what?</h2>
<ul>
<li class="slide">Leaner, more focused, and more reusable markup</li>
<li class="slide">Cleaner, more modular, and more maintainable stylesheets</li>
<li class="slide">Lower file-sizes</li>
</ul>
</div>
<figure class="slide">
<img src="http://i1.kym-cdn.com/entries/icons/original/000/000/213/robocop-unicorn.jpg" />
</figure>
</div>
</section>
<section class="slide" id="what-do-we-have">
<h1>What do we have now?</h1>
<h2 class="slide">A LOT!!!</h2>
<ul>
<li class="slide" id="we-have-style-guides">
<h3>Style-Guide Systems</h3>
<ul>
<li>Object Oriented CSS (OOCSS)</li>
<li>Scalable Modular Architecture for CSS (SMACSS)</li>
<li>Block, Element, Modular (BEM)</li>
<li>Atomic CSS (ACSS)</li>
</ul>
</li>
<li class="slide" id="we-have-pre-proc">
<h3>Pre-Processors</h3>
<ul>
<li>LESS</li>
<li>SASS/SCSS</li>
<li>Stylus</li>
</ul>
</li>
<li class="slide" id="we-have-post-proc">
<h3>Post-Processors</h3>
<ul>
<li>PostCSS</li>
<li>Autoprefixer</li>
<li>Rework</li>
<li>Lots of new entrants every day</li>
</ul>
</li>
<li class="slide" id="we-have-frameworks">
<h3>Frameworks</h3>
<ul>
<li>Bootstrap</li>
<li>Foundation</li>
<li>Pure</li>
</ul>
</li>
</ul>
</section>
<section class="slide" id="details-style-guides">
<h1>Style-Guide Systems</h1>
<h2>Really good at:</h2>
<ul>
<li class="slide">creating a visual language for reusable layout patterns</li>
<li class="slide">keeping layout patterns organized, and modular</li>
<li class="slide">...but</li>
</ul>
<pre class="slide">
.container .row .column-md-12 .btn-group .btn.btn-primary {
content: "What were we talking about again?";
}
</pre>
<div class="details">
<ul>
<li class="slide">requires use of non-semantic "utility classes"</li>
<li class="slide">lowers markup reusability</li>
<li class="slide">violates the Separation of Concerns principle</li>
<li class="slide">leads to increasingly higher specificity overrides</li>
</ul>
<figure class="slide">
<img src="https://i.imgflip.com/ieu04.jpg" title="made at imgflip.com"/>
</figure>
</div>
</section>
<section class="slide" id="details-pre-proc">
<h1>Pre-Processors</h1>
<h2>Pre-Processors are AWESOME!! <small class="slide">(until they're not)</small></h2>
<p class="slide">What's good about them is what's bad about them</p>
<ul>
<li class="slide">Brings programmability to CSS</li>
<li class="slide">Makes them easy to abuse/misuse</li>
<li class="slide">misuse can lead to, bloat, fragile chains of inheritance, and redundancy in the css output</li>
</ul>
<pre class="slide">
.selector-with-common-styling {
background: red;
color: blue;
display: block;
}
.other-selector-that-needs-same-styles {
&:extend(.selector-with-common-styles);
}
</pre>
</section>
<section class="slide" id="details-post-proc">
<h1>Post-Processors</h1>
<h2>They're just like pre-processors, only later!</h2>
<div class="details">
<ul>
<li class="slide">They have an advantage of not needing a non-native CSS source language, but...</li>
<li class="slide">I don't really care about that</li>
<li class="slide">Similarly powerful, but not yet as stable or robust</li>
</ul>
<figure>
<img src="https://i.imgflip.com/ietdi.jpg" title="made at imgflip.com"/>
</figure>
</div>
</section>
<section class="slide" id="analogy-pre-proc">
<p>CSS Processors are like a car. <span class="slide">You can cover great distances very quickly</span><span id="car-on-fire" class="slide">, but in using them you increase your chances of being involved in an accident.</span> <span class="slide">Especially when under time pressure, or trying to navigate with poor directions.</span></p>
<figure>
<img class="driving" src="http://www.carmagblog.co.za/wp-content/uploads/2012/07/R40-001.jpg" />
<img class="crashed" src="http://www.shezadmalik.com/docs/dallas_car_accident_attorney.jpg" />
</figure>
</section>
<section class="slide" id="details-frameworks">
<h1>Frameworks</h1>
<h2>Frameworks are AWESOME!!! <small class="slide">(until they're not)</small></h2>
<ul>
<li class="slide">easy for getting up and running fast</li>
<li class="slide">but hard to maintain</li>
<li class="slide">utility classes pile up and lead to a specificity arms race</li>
<li class="slide">don't always make sense at certain breakpoints of responsive layouts</li>
<li class="slide">design changes lead to breakages</li>
<li class="slide">often force you to choose between significant refactors or ugly ugly patches</li>
</ul>
</section>
<section class="slide" id="bad-examples">
<p>...like these:</p>
<div class="details">
<pre class="slide">
@media (max-width: 767px) {
#sidebar {
width: 100%;
}
}
</pre>
<pre class="slide">
.hide {
display: block;
}
</pre>
<pre class="slide">
.pull-left {
float: right !important;
}
</pre>
<figure class="slide">
<img src="https://imgflip.com/readImage?iid=1509839" />
</figure>
</div>
</section>
<section class="slide" id="if-only">
<figure>
<img src="https://i.imgflip.com/iettf.jpg" title="made at imgflip.com"/>
</figure>
</section>
<section class="slide" id="tldr-solutions">
<h1>Solutions</h1>
<ul>
<li class="slide">Semantic Classing</li>
<li class="slide">Divide style sheets into meaningful, modular layout components</li>
<li class="slide">Use <strong>extend</strong> to assign visually defined classes to semantically defined classes</li>
</ul>
</section>
<section class="slide" id="sem-classing">
<h1>Semantic Classing</h1>
<!-- show WikiPedia def of Semantic HTML -->
<blockquote>
<p><strong>Semantic HTML</strong> is the use of HTML markup to reinforce the semantics, or meaning, of the information in webpages rather than merely to define its presentation or look. Semantic HTML is processed by regular web browsers as well as by many other user agents. CSS is used to suggest its presentation to human users.</p>
</blockquote>
<!-- show some examples -->
<code>
<div class="content-wrapper"> <br>
<section class="news-items" role="main"><br>
<article id="news-item-436" class="news-item"> <br>
<header> <br>
<h1>News Item Title</h1> <br>
<h2>By line</h2> <br>
</header> <br>
<div class="article-body"> <br>
<p>[...]</p> <br>
</div> <br>
</article> <br >
</section> <br>
<aside role="complementary"> <br>
<h3>Author Name</h3> <br>
<ul class="articles-by-author"> <br>
[...] <br>
</ul> <br>
<ul class="related-articles"> <br>
[...] <br>
</ul> <br>
</aside> <br>
</div>
</code>
</section>
<section class="slide" id="layout-objects">
<h1>Divide style sheets into meaningful layout pieces</h1>
<!-- show WikiPedia def -->
<!-- show some examples -->
<pre>
.layout-article-full {
display: flex;
// mobile-first layout
[role="main"],
[role="complementary"],
[role="complementary"] > ul {
display: block;
width: 100%;
}
// tablet/portrait layout
@media (min-width: 960px) {
[role="complementary"] > ul {
flex: 1 auto;
}
// tablet/landscape, desktop layout
@media (min-width: 960px) {
// introduce 2-col layout
[role="main"] {
flex: 3 auto;
}
[role="complementary"] {
flex: 1 auto;
}
}
}
</pre>
</section>
<section class="slide" id="extending">
<h1>Semantic Remapping with @extend</h1>
<!-- show a quick example with Bootstrap & LESS -->
<!-- walk through using @import / placeholders -->
<pre>
.content-wrapper {
&:extend(.layout-article-full all);
}
</pre>
<h2 class="slide">THAT'S IT!!! <aside class="slide"><em>(...sort of)</em></aside></h2>
</section>
<section class="slide" id="demo">
<h1>Let's take a closer look</h1>
<!-- layout demo -->
<!-- show before / after file-sizes -->
<div class="slide" id="basic-extend-less">
<p><a href="http://localhost/presentations/semantic-remapping/demos/processor-comparisons/less/">Simple Extend Demo</a></p>
</div>
<div class="slide" id="pure-extend-demo">
<p><a href="http://localhost/presentations/semantic-remapping/demos/processor-comparisons/less/nested">Nested Extend Demo with Pure</a></p>
</div>
</section>
<section class="slide" id="benefits">
<h1>Benefits and Best Practices</h1>
<!-- super modular -->
<ul>
<li>Allows for clean, modular layout abstractions</li>
<!-- useful for above the fold inline style injection -->
<li>Allows for easy re-organization of styles for things like above the fold inline-CSS injection</li>
<!-- supportive of patternlab prototyping and webcomponents -->
<!-- file sizes stay low -->
<a href="http://refresh-sf.com/" target="_blank">When Compressed</a>
</section>
<section class="slide" id="placeholdernater">
<h1>Placeholdernater</h1>
</section>
<section class="slide" id="questions">
<h1>Questions?</h1>
</section>
<!-- End slides. -->
<!-- Begin extension snippets. Add or remove as needed. -->
<!-- deck.navigation snippet -->
<div aria-role="navigation">
<a href="#" class="deck-prev-link" title="Previous">←</a>
<a href="#" class="deck-next-link" title="Next">→</a>
</div>
<!-- deck.status snippet -->
<p class="deck-status" aria-role="status">
<span class="deck-status-current"></span>
/
<span class="deck-status-total"></span>
</p>
<!-- deck.goto snippet -->
<form action="." method="get" class="goto-form">
<label for="goto-slide">Go to slide:</label>
<input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
<datalist id="goto-datalist"></datalist>
<input type="submit" value="Go">
</form>
<!-- End extension snippets. -->
</div>
<!-- Required JS files. -->
<script src="jquery.min.js"></script>
<script src="core/deck.core.js"></script>
<!-- Extension JS files. Add or remove as needed. -->
<script src="extensions/menu/deck.menu.js"></script>
<script src="extensions/goto/deck.goto.js"></script>
<script src="extensions/status/deck.status.js"></script>
<script src="extensions/navigation/deck.navigation.js"></script>
<!--<script src="extensions/scale/deck.scale.js"></script> -->
<!-- Initialize the deck. You can put this in an external file if desired. -->
<script>
$(function() {
$.deck('.slide');
});
</script>
</body>
</html>