-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·626 lines (515 loc) · 20 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
623
624
625
626
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>deck</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">
<link rel="stylesheet" href="http://static2.meetupstatic.com/fonts/whitney.css">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/default.css" id="theme">
<link rel="stylesheet" href="css/custom.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</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 data-markdown data-background="#222" class="sassy--color">
<script type="text/template">
# Let's talk about CSS*!
*and Sass
</script>
</section>
<section class="meetup-intro" data-background="img/billboard.jpg" data-transition="fade">
<p style="padding-bottom: 8px;">I'm Adam Detrick and I work for Meetup</p>
<p style="padding-top: 0px;" class="sassy--color">[email protected] | @akdetrick</p>
</section>
<section data-background="#666">
<section data-background="#666">
<h2>an opening thought...</h2>
</section>
<section data-background="#fff">
<img src="img/takashi_tweet.png" style="width: 100%; border-width: 0;" />
</section>
</section>
<section data-background="#222">
<h3>CSS problems at Meetup</h3>
<ul>
<li class="fragment">
meetup is over 10 years old
<ul>
<li class="fragment">~1000 jsp files</li>
<li class="fragment">~180 scss files</li>
<li class="fragment">over 2000 instacnes of "color:" in compiled css</li>
</ul>
</li>
<li class="fragment">we hit the css limit in internet explorer</li>
<li class="fragment">lots of engineers; potential for inconsistency</li>
<li class="fragment">we went years without dedicated designers</li>
</ul>
</section>
<section data-background="#222">
<h3>Some CSS problems are not<br />unique to Meetup</h3>
<ul>
<li class="fragment">design consistency</li>
<li class="fragment">reinventing solutions to problems that <br />have already been solved</li>
<li class="fragment">overly-specific (and hard to reuse) CSS</li>
<li class="fragment">lack of a canonnical way to accomplish a given task</li>
<li class="fragment">existing code is hard to document</li>
<li class="fragment">unending cycle of code bloat</li>
</ul>
</section>
<section data-background="#222">
<h2>Let's throw out this crap and rewrite everything!</h2>
</section>
<section data-background="#222">
<img src="img/tsc_home.png" class="fragment" style="border-width: 0;" />
</section>
<section data-background="#222">
<img src="img/tsc1.png" style="border-width: 0;" />
</section>
<section data-background="#222">
<img src="img/tsc2.png" style="border-width: 0;" />
</section>
<section data-background="#222">
<h2>"It will only take <br />a few months"</h2>
</section>
<section data-background="#222">
<h2>Starting clean is<br />not a solution</h2>
<p class="fragment">... and it's frustrating</p>
</section>
<section data-markdown>
<script type="text/template">
## Let's talk about botany for a moment
</script>
</section>
<section data-background="#000">
<section data-markdown>
<script type="text/template">
## Strangler Vines
Tropical plants that grow on host trees
</script>
</section>
<section data-background="http://farm9.staticflickr.com/8205/8251868992_c9a35bf025_h.jpg" data-background-size="contain" data-background-transition="slide">
<p class="attribution">flickr/edrabbit</p>
</section>
<section data-background="http://farm4.staticflickr.com/3503/3828905896_e13528bbbf_b.jpg" data-background-size="contain" data-background-transition="slide">
<p class="attribution">flickr/nancybaym</p>
</section>
<section data-background="http://farm2.staticflickr.com/1040/956891083_ceba98c386_o.jpg" data-background-size="contain" data-background-transition="slide">
<p class="attribution">flickr/laughingface</p>
</section>
<section data-background="http://farm6.staticflickr.com/5018/5501316782_4be0a28ccf_b.jpg" data-background-size="contain" data-background-transition="slide">
<p class="attribution">flickr/anitagould</p>
</section>
</section>
<section data-markdown>
<script type="text/template">
## The Strangler Pattern
As introduced by [Martin Fowler](http://martinfowler.com/bliki/StranglerApplication.html)
</script>
</section>
<section data-markdown class="align-left">
<script type="text/template">
> "... create a new system around the edges of the old, letting it grow slowly until the old system is strangled."
</script>
</section>
<section data-markdown class="align-left">
<script type="text/template">
> "... you should design [your new application] to make it easier to be strangled in the future."
> "Let's face it, all we are doing is writing tomorrow's legacy software today."
</script>
</section>
<section>
<h2>What about CSS?</h2>
</section>
<section>
<h2>A successful strangler application needs...</h2>
<ul>
<li class="fragment">A way to introduce a new system without breaking the current one</li>
<li class="fragment">The ability to make incremental changes to replace legacy code</li>
</ul>
</section>
<section>
<hgroup>
<h1>C<span class="fragment fade-out">SS</span></h1>
<h2 class="fragment">is for cascade</h2>
</hgroup>
</section>
<section>
<h2>Strangling CSS</h2>
<p>"Seed" the top of your cascade with a new CSS foundation</p>
<div class="document-figure">
<div class="document-line--focus" style="line-height: 5;">New CSS Foundation</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
</div>
</section>
<section>
<section data-transition="fade">
<div class="figureset">
<div class="figureset-figure document-figure">
<div class="document-line--focus" style="line-height: 23;">New CSS Foundation</div>
</div>
<div class="figureset-description">
<h3>Foundation?</h3>
</div>
</div>
</section>
<section data-transition="fade">
<div class="figureset">
<div class="figureset-figure document-figure">
<div class="document-line--focus" style="line-height: 4;">util (if pre-processing)</div>
<div class="document-line" style="line-height: 4;">element defaults</div>
<div class="document-line" style="line-height: 4;">layout system</div>
<div class="document-line" style="line-height: 4;">common patterns/components</div>
<div class="document-line" style="line-height: 4;">modifiers</div>
</div>
<div class="figureset-description">
<h4>Sass utilities</h4>
<p>vars, functions, etc.</p>
</div>
</div>
</section>
<section data-transition="fade">
<div class="figureset">
<div class="figureset-figure document-figure">
<div class="document-line" style="line-height: 4;">util (if pre-processing)</div>
<div class="document-line--focus" style="line-height: 4;">element defaults</div>
<div class="document-line" style="line-height: 4;">layout system</div>
<div class="document-line" style="line-height: 4;">common patterns/components</div>
<div class="document-line" style="line-height: 4;">modifiers</div>
</div>
<div class="figureset-description">
<h4>Custom "normalize" css</h4>
<p>handles element defaults, typography, etc.</p>
</div>
</div>
</section>
<section data-transition="fade">
<div class="figureset">
<div class="figureset-figure document-figure">
<div class="document-line" style="line-height: 4;">util (if pre-processing)</div>
<div class="document-line" style="line-height: 4;">element defaults</div>
<div class="document-line--focus" style="line-height: 4;">layout system</div>
<div class="document-line" style="line-height: 4;">common patterns/components</div>
<div class="document-line" style="line-height: 4;">modifiers</div>
</div>
<div class="figureset-description">
<h4>A basic layout system</h4>
<p>oocss grids, responsive grid system, susy, etc.</p>
</div>
</div>
</section>
<section data-transition="fade">
<div class="figureset">
<div class="figureset-figure document-figure">
<div class="document-line" style="line-height: 4;">util (if pre-processing)</div>
<div class="document-line" style="line-height: 4;">element defaults</div>
<div class="document-line" style="line-height: 4;">layout system</div>
<div class="document-line--focus" style="line-height: 4;">common patterns/components</div>
<div class="document-line" style="line-height: 4;">modifiers</div>
</div>
<div class="figureset-description">
<h4>Common markup & style patterns</h4>
<p>media blocks, special lists, etc.</p>
<p><em>ie. <a href="http://codepen.io/akdetrick/full/gltbd">figureset</a></em></p>
</div>
</div>
</section>
<section data-transition="fade">
<div class="figureset">
<div class="figureset-figure document-figure">
<div class="document-line" style="line-height: 4;">util (if pre-processing)</div>
<div class="document-line" style="line-height: 4;">element defaults</div>
<div class="document-line" style="line-height: 4;">layout system</div>
<div class="document-line" style="line-height: 4;">common patterns/components</div>
<div class="document-line--focus" style="line-height: 4;">modifiers</div>
</div>
<div class="figureset-description">
<h4>Modifier classes</h4>
<p>simple, standard styling helpers</p>
<hr />
<div data-markdown>
<script type="text/template">
``` css
.leading-top { padding-top: $spacing; }
```
``` css
.ellipsize {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
```
</script>
</div>
</div>
</section>
</section>
<section>
<p>What happens to legacy CSS?</p>
<div class="document-figure">
<div class="document-line" style="line-height: 5;">New CSS Foundation</div>
<div class="document-line--focus">legacy</div>
<div class="document-line--focus">legacy</div>
<div class="document-line--focus">legacy</div>
<div class="document-line--focus">legacy</div>
<div class="document-line--focus">legacy</div>
<div class="document-line--focus">legacy</div>
<div class="document-line--focus">legacy</div>
</div>
</section>
<section>
<section data-markdown data-transition="linear">
<script type="text/template">
### Growing your strangler vines
</script>
</section>
<section data-markdown data-transition="linear">
<script type="text/template">
#### Markup
``` html
<div id="mySpecialThing">
<div id="specialThingHeading">
It's special.
</div>
<div id="specialThingContent">
<span>Really</span> special.
</div>
</div>
```
----
``` html
<h2>
It's not special.
</h2>
<p>
It just <em>makes sense</em> now.
</p>
```
</script>
</section>
<section data-markdown data-transition="linear">
<script type="text/template">
#### CSS
``` css
#mySpecialThing {
/* ... bunch o' rules ... */
}
#specialThingHeading {
/* ... bunch o' rules ... */
}
#specialThingContent {
/* ... bunch o' rules ... */
}
#specialThingContent span {
/* ... bunch o' rules ... */
}
```
----
``` css
/* lol, nope */
```
</script>
</section>
<section data-transition="fade">
<h4>You're able to start deleting legacy CSS...</h4>
<div class="document-figure">
<div class="document-line" style="line-height: 5;">New CSS Foundation</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line--focus">deleted legacy component</div>
</div>
</section>
<section data-transition="fade">
<h4>As you repeat this process...</h4>
<div class="document-figure">
<div class="document-line" style="line-height: 5;">New CSS Foundation</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line--focus">deleted legacy component</div>
</div>
</section>
<section data-transition="fade">
<h4>More and more of the legacy CSS goes away...</h4>
<div class="document-figure">
<div class="document-line--focus" style="line-height: 5;">New CSS Foundation</div>
<div class="document-line">legacy</div>
<div class="document-line">legacy</div>
<div class="document-line--focus">deleted legacy component</div>
</div>
</section>
<section data-transition="fade">
<h4>Eventually leaving you with something more like this:</h4>
<div class="document-figure">
<div class="document-line--focus" style="line-height: 5;">New CSS Foundation</div>
<div class="document-line" style="line-height: 3;">Custom CSS</div>
</div>
</section>
</section>
<section data-markdown data-background="#222">
<script type="tect/template">
## Building the foundation
</script>
</section>
<section data-markdown data-background="#222">
<script type="text/template">
### Design + Code 4 eva
_design_ for systems, not for pages
----
_code_ for systems, not for pages
</script>
</section>
<section data-markdown data-background="#222">
<script type="text/template">
### Style tiles
[http://styletil.es/](http://styletil.es/)
![style tile](img/shane.png)
</script>
</section>
<section data-markdown data-background="#222">
<script type="text/template">
### Type speicimens
[meetup type specimen](http://meetup.github.io/sassquatch/specimen.html)
</script>
</section>
<section data-markdown data-background="#222">
<script type="text/template">
### Element defaults
![type specimen](img/specimen.png)
``` css
$headingFontStack: 'Whitney', helvetica, arial, sans-serif;
h1,h2,h3,h4,h5,h6 {
font-family: $headingFontStack;
color: $C_textPrimary;
margin: 0;
padding: 0;
padding-bottom: $baseline/2;
line-height: 1.1;
font-weight: $W_bold;
.inverted & {
color: $C_textPrimaryInverted;
}
}
```
</script>
</section>
<section data-markdown data-background="#9f1627" class="sq">
<script type="text/template">
## Meet Sassquatch
</script>
</section>
<section data-markdown data-background="#9f1627" class="sq">
<script type="text/template">
### A CSS foundation for Meetup
(we use this as our strangler vine)
</script>
</section>
<section>
<h3>Demo Time</h3>
<p><a href="http://meetup.github.io/sassquatch/">Live style guide (jekyll)</a></p>
<p><a href="http://meetup.github.io/sassquatch/doc_desktop/">Live style guide (hologram)</a></p>
<p><a href="http://meetup.github.io/sassquatch/specimen-event.html">Mock event details</a></p>
<p><a href="http://meetup.github.io/sassquatch/tests/brightness.html">Visual tests</a></p>
</section>
<section>
<h3>Let's look at some <a href="https://github.com/meetup/sassquatch">Code</a></h3>
</section>
<section>
<h3>_crustybase.scss</h3>
</section>
<section data-markdown>
<script type="text/template">
### Killing 300kb of CSS,<br />one page at a time
``` jsp
<jsp:param name="isModernLayout" value="${true}" />
```
-----
``` jsp
<c:choose>
<c:when test="${not empty param.isModernLayout}">
<c:set var="mainStylesheetPath" value="/style/meetup-modern.css" />
</c:when>
<c:otherwise>
<c:set var="mainStylesheetPath" value="/style/meetup.css" />
</c:otherwise>
</c:choose>
```
</script>
</section>
<section data-markdown>
<script type="text/template">
## Where are we now?
</script>
</section>
<section data-markdown>
<script type="text/template">
### Added bonus
Sassquatch consolidated domain-specific knowledge
</script>
</section>
<section data-background="#666">
<h2>a closing thought...</h2>
</section>
<section data-background="#111">
<h1 class="sassy--color">Thanks!</h1>
<p>github.com/akdetrick/sassquatch-presentation</p>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: false,
progress: true,
history: true,
center: true,
width: 1024,
margin: 0.05,
previewLinks: true,
theme: "moon", // available themes are in /css/theme
transition: "concave", // default/cube/page/concave/zoom/linear/fade/none
// Parallax scrolling
// parallaxBackgroundImage: 'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg',
// parallaxBackgroundSize: '2100px 900px',
// Optional libraries used to extend on reveal.js
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, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>