-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
564 lines (539 loc) · 29.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Your page title here :)</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/snippet.css">
<!-- Favicon
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="icon" type="image/png" href="images/favicon.png">
</head>
<body>
<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<div class="container u-limit-max-width">
<section class="u-center-text">
<h1 class="u-center">A dead simple, responsive boilerplate.</h1>
<a class="button button-primary" href="https://github.com/dhg/Snippet/releases/download/2.0.4/Snippet-2.0.4.zip" onClick="_gaq.push(['_trackEvent', 'skeleton', 'download'])">Download</a>
<div class="value-props row">
<div class="four columns value-prop">
<img class="value-img" src="images/feather.svg">
Light as a feather at ~400 lines & built with mobile in mind.
</div>
<div class="four columns value-prop">
<img class="value-img" src="images/pens.svg">
Styles designed to be a starting point, not a UI framework.
</div>
<div class="four columns value-prop">
<img class="value-img" src="images/watch.svg">
Quick to start with zero compiling or installing necessary.
</div>
</div>
</section>
<div class="navbar-spacer"></div>
<nav class="navbar">
<div class="container">
<ul class="navbar-list">
<li class="navbar-item"><a class="navbar-link" href="#intro">Intro</a></li>
<li class="navbar-item">
<a class="navbar-link" href="#" data-popover="#codeNavPopover">Code</a>
<div id="codeNavPopover" class="popover">
<ul class="popover-list">
<li class="popover-item">
<a class="popover-link" href="#grid">Grid</a>
</li>
<li class="popover-item">
<a class="popover-link" href="#typography">Typography</a>
</li>
<li class="popover-item">
<a class="popover-link" href="#buttons">Buttons</a>
</li>
<li class="popover-item">
<a class="popover-link" href="#forms">Forms</a>
</li>
<li class="popover-item">
<a class="popover-link" href="#lists">Lists</a>
</li>
<li class="popover-item">
<a class="popover-link" href="#code">Code</a>
</li>
<li class="popover-item">
<a class="popover-link" href="#tables">Tables</a>
</li>
<li class="popover-item">
<a class="popover-link" href="#queries">Queries</a>
</li>
<li class="popover-item">
<a class="popover-link" href="#utilities">Utilities</a>
</li>
</ul>
</div>
</li>
<li class="navbar-item"><a class="navbar-link" href="#examples">Examples</a></li>
<li class="navbar-item">
<a class="navbar-link" href="#" data-popover="#moreNavPopover">More</a>
<div id="moreNavPopover" class="popover">
<ul class="popover-list">
<li class="popover-item">
<a class="popover-link" href="https://github.com/dhg/Snippet">On Github</a>
</li>
<li class="popover-item">
<a class="popover-link" href="https://github.com/dhg/Snippet#browser-support">Browsers</a>
</li>
<li class="popover-item">
<a class="popover-link" href="https://github.com/dhg/Snippet#license">License</a>
</li>
<li class="popover-item">
<a class="popover-link" href="https://github.com/dhg/Snippet#extensions">Extensions</a>
</li>
<li class="popover-item">
<a class="popover-link" href="https://github.com/dhg/Snippet/releases">Versions</a>
</li>
<li class="popover-item">
<a class="popover-link" href="https://github.com/dhg/Snippet#colophon">Colophon</a>
</li>
</ul>
</div>
</li>
</ul>
</div>
</nav>
<!-- Why use Snippet -->
<div class="docs-section" id="intro">
<h2 class="docs-header">Is Snippet for you?</h2>
<p>You should use Snippet if you're embarking on a smaller project or just don't feel like you need all the utility of larger frameworks. Snippet only styles a handful of standard HTML elements and includes a grid, but that's often more than enough to get started. In fact, <u>this site is built on Snippet and has ~200 lines of custom CSS</u> (half of which is the docking navigation).</p>
<p>Love Snippet and want to Tweet it, share it, or star it? Well, I appreciate that <3</p> <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.getskeleton.com" data-text="Snippet - A dead simple, responsive boilerplate." data-via="dhg" data-related="dhg">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<!-- <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.getskeleton.com&width&layout=button_count&action=like&show_faces=false&share=true&height=21&appId=151131931646052" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px; width:140px" allowTransparency="true"></iframe> -->
<iframe src="http://ghbtns.com/github-btn.html?user=dhg&repo=Snippet&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=dhg&repo=Snippet&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
</div>
<!-- Grid -->
<div class="docs-section" id="grid">
<h2 class="docs-header">The grid</h2>
<p>The grid is a <u>12-column fluid grid with a max width of 960px</u>, that shrinks with the browser/device at smaller sizes. The max width can be changed with one line of CSS and all columns will resize accordingly. The syntax is simple and it makes coding responsive much easier. Go ahead, resize the browser. </p>
<div class="example-grid docs-example">
<div class="row">
<div class="one column">One</div>
<div class="eleven columns">Eleven</div>
</div>
<div class="row">
<div class="two columns">Two</div>
<div class="ten columns">Ten</div>
</div>
<div class="row">
<div class="three columns">Three</div>
<div class="nine columns">Nine</div>
</div>
<div class="row">
<div class="four columns">Four</div>
<div class="eight columns">Eight</div>
</div>
<div class="row">
<div class="five columns">Five</div>
<div class="seven columns">Seven</div>
</div>
<div class="row">
<div class="six columns">Six</div>
<div class="six columns">Six</div>
</div>
<div class="row">
<div class="seven columns">Seven</div>
<div class="five columns">Five</div>
</div>
<div class="row">
<div class="eight columns">Eight</div>
<div class="four columns">Four</div>
</div>
<div class="row">
<div class="nine columns">Nine</div>
<div class="three columns">Three</div>
</div>
<div class="row">
<div class="ten columns">Ten</div>
<div class="two columns">Two</div>
</div>
<div class="row">
<div class="eleven columns">Eleven</div>
<div class="one column">One</div>
</div>
</div>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="code-example-body prettyprint"><!-- .container is main centered wrapper -->
<div class="container">
<!-- columns should be the immediate child of a .row -->
<div class="row">
<div class="one column">One</div>
<div class="eleven columns">Eleven</div>
</div>
<!-- just use a number and class 'column' or 'columns' -->
<div class="row">
<div class="two columns">Two</div>
<div class="ten columns">Ten</div>
</div>
<!-- there are a few shorthand columns widths as well -->
<div class="row">
<div class="one-third column">1/3</div>
<div class="two-thirds column">2/3</div>
</div>
<div class="row">
<div class="one-half column">1/2</div>
<div class="one-half column">1/2</div>
</div>
</div>
<!-- Note: columns can be nested, but it's not recommended since Snippet's grid has %-based gutters, meaning a nested grid results in variable with gutters (which can end up being *really* small on certain browser/device sizes) -->
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
<!-- Typography -->
<div class="docs-section" id="typography">
<h2 class="docs-header">Typography</h2>
<p>Type is all set with the <code>rems</code>, so font-sizes and spacial relationships can be responsively sized based on a single <code><html></code> font-size property. Out of the box, Snippet never changes the <code><html></code> font-size, but it's there in case you need it for your project. All measurements are still base 10 though so, an <code><h1></code> with <code>5.0rem</code>font-size just means <code>50px</code>.</p>
<div class="docs-example">
<div class="row">
<div class="six columns">
<p><strong>The typography base</strong> is <a href="http://www.google.com/fonts/specimen/Raleway">Raleway</a> served by Google, set at 15rem (15px) over a 1.6 line height (24px). Other type basics like <a href="#">anchors</a>, <strong>strong</strong>, <em>emphasis</em>, and <u>underline</u> are all obviously included.</p>
<p><strong>Headings</strong> create a family of distinct sizes each with specific <code>letter-spacing</code>, <code>line-height</code>, and <code>margins</code>.</p>
</div>
<div class="six columns">
<h1>Heading<span class="heading-font-size"> <code><h1></code> 50rem</span></h1>
<h2>Heading<span class="heading-font-size"> <code><h2></code> 42rem</span></h2>
<h3>Heading<span class="heading-font-size"> <code><h3></code> 36rem</span></h3>
<h4>Heading<span class="heading-font-size"> <code><h4></code> 30rem</span></h4>
<h5>Heading<span class="heading-font-size"> <code><h5></code> 24rem</span></h5>
<h6>Heading<span class="heading-font-size"> <code><h6></code> 15rem</span></h6>
</div>
</div>
</div>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="code-example-body prettyprint"><!-- Standard Headings -->
<h1>Heading</h1>
<h2>Heading</h2>
<h3>Heading</h3>
<h4>Heading</h4>
<h5>Heading</h5>
<h6>Heading</h6>
<!-- Base type size -->
<p>The base type is 15px over 1.6 line height (24px)</p>
<!-- Other styled text tags -->
<strong>Bolded</strong>
<em>Italicized</em>
<a>Colored</a>
<u>Underlined</u>
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
<!-- Buttons -->
<div class="docs-section" id="buttons">
<h2 class="docs-header">Buttons</h2>
<p>Buttons come in two basic flavors in Snippet. The standard <code><button></code> element is plain, whereas the <code>.button-primary</code> button is vibrant and prominent. Button styles are applied to a number of appropriate form elements, but can also be arbitrarily attached to anchors with a <code>.button</code> class.</p>
<div class="docs-example">
<div>
<a class="button" href="#">Anchor button</a>
<button>Button element</button>
<input type="submit" value="submit input">
<input type="button" value="button input">
</div>
<div>
<a class="button button-primary" href="#">Anchor button</a>
<button class="button-primary">Button element</button>
<input class="button-primary" type="submit" value="submit input">
<input class="button-primary" type="button" value="button input">
</div>
</div>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="code-example-body prettyprint"><!-- Standard buttons -->
<a class="button" href="#">Anchor button</a>
<button>Button element</button>
<input type="submit" value="submit input">
<input type="button" value="button input">
<!-- Primary buttons -->
<a class="button button-primary" href="#">Anchor button</a>
<button class="button-primary">Button element</button>
<input class="button-primary" type="submit" value="submit input">
<input class="button-primary" type="button" value="button input">
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
<!-- Forms -->
<div class="docs-section" id="forms">
<h2 class="docs-header">Forms</h2>
<p>Forms are a huge pain, but hopefully these styles make it a bit easier. All inputs, select, and buttons are normalized for a common height cross-browser so inputs can be stacked or placed alongside each other.</p>
<div class="docs-example docs-example-forms">
<form>
<div class="row">
<div class="six columns">
<label for="exampleEmailInput">Your email</label>
<input class="u-full-width" type="email" placeholder="[email protected]" id="exampleEmailInput">
</div>
<div class="six columns">
<label for="exampleRecipientInput">Reason for contacting</label>
<select class="u-full-width" id="exampleRecipientInput">
<option value="Option 1">Questions</option>
<option value="Option 2">Admiration</option>
<option value="Option 3">Can I get your number?</option>
</select>
</div>
</div>
<label for="exampleMessage">Message</label>
<textarea class="u-full-width" placeholder="Hi Dave …" id="exampleMessage"></textarea>
<label class="example-send-yourself-copy">
<input type="checkbox">
<span class="label-body">Send a copy to yourself</span>
</label>
<input class="button-primary" type="submit" value="Submit">
</form>
</div>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="code-example-body prettyprint"><!-- The above form looks like this -->
<form>
<div class="row">
<div class="six columns">
<label for="exampleEmailInput">Your email</label>
<input class="u-full-width" type="email" placeholder="[email protected]" id="exampleEmailInput">
</div>
<div class="six columns">
<label for="exampleRecipientInput">Reason for contacting</label>
<select class="u-full-width" id="exampleRecipientInput">
<option value="Option 1">Questions</option>
<option value="Option 2">Admiration</option>
<option value="Option 3">Can I get your number?</option>
</select>
</div>
</div>
<label for="exampleMessage">Message</label>
<textarea class="u-full-width" placeholder="Hi Dave …" id="exampleMessage"></textarea>
<label class="example-send-yourself-copy">
<input type="checkbox">
<span class="label-body">Send a copy to yourself</span>
</label>
<input class="button-primary" type="submit" value="Submit">
</form>
<!-- Always wrap checkbox and radio inputs in a label and use a <span class="label-body"> inside of it -->
<!-- Note: The class .u-full-width is just a utility class shorthand for width: 100% -->
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
<!-- Lists -->
<div class="docs-section" id="lists">
<h2 class="docs-header">Lists</h2>
<div class="row docs-example">
<div class="six columns">
<ul>
<li>Unordered lists have basic styles</li>
<li>
They use the circle list style
<ul>
<li>Nested lists styled to feel right</li>
<li>Can nest either type of list into the other</li>
</ul>
</li>
<li>Just more list items mama san</li>
</ul>
</div>
<div class="six columns">
<ol>
<li>Ordered lists also have basic styles</li>
<li>
They use the decimal list style
<ul>
<li>Ordered and unordered can be nested</li>
<li>Can nest either type of list into the other</li>
</ul>
</li>
<li>Last list item just for the fun</li>
</ol>
</div>
</div>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="code-example-body prettyprint"><ul>
<li>Item 1</li>
<li>
Item 2
<ul>
<li>Item 2.1</li>
<li>Item 2.2</li>
</ul>
</li>
<li>Item 3</li>
</ul>
<!-- Easily substitute any <ul> or an <ol> to get number lists or sublists. Snippet doesn't support lists nested deeper than 2 levels -->
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
<!-- Code -->
<div class="docs-section" id="code">
<h2 class="docs-header">Code</h2>
<p>Code styling is kept basic – just wrap anything in a <code><code></code> and it will appear like <code>this</code>. For blocks of code, wrap a <code><code></code> with a <code><pre></code>.</p>
<div class="docs-example">
<pre><code>.some-class {
background-color: red;
}</code></pre>
</div>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="code-example-body prettyprint"><pre><code>.some-class {
background-color: red;
}</code></pre>
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
<!-- Tables -->
<div class="docs-section" id="tables">
<h2 class="docs-header">Tables</h2>
<p>Be sure to use properly formed table markup with <code><thead></code> and <code><tbody></code> when building a <code>table</code>.</p>
<div class="docs-example">
<table class="u-full-width">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>Sex</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr>
<td>Dave Gamache</td>
<td>26</td>
<td>Male</td>
<td>San Francisco</td>
</tr>
<tr>
<td>Dwayne Johnson</td>
<td>42</td>
<td>Male</td>
<td>Hayward</td>
</tr>
</tbody>
</table>
</div>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="html"><table class="u-full-width">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>Sex</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr>
<td>Dave Gamache</td>
<td>26</td>
<td>Male</td>
<td>San Francisco</td>
</tr>
<tr>
<td>Dwayne Johnson</td>
<td>42</td>
<td>Male</td>
<td>Hayward</td>
</tr>
</tbody>
</table>
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
<!-- Queries -->
<div class="docs-section" id="queries">
<h2 class="docs-header">Media queries</h2>
<p>Snippet uses media queries to serve its scalable grid, but also has a list of queries for convenience of styling your site across devices. The queries are mobile-first, meaning they target <code>min-width</code>. Mobile-first queries are how Snippet's grid is built and is the preferrable method of organizing CSS. It means all styles outside of a query apply to all devices, then larger devices are targeted for enhancement. This prevents small devices from having to parse tons of unused CSS. The sizes for the queries are:</p>
<div class="docs-example row">
<div class="six columns">
<ul>
<li><strong>Desktop HD</strong>: 1200px</li>
<li><strong>Desktop</strong>: 1000px</li>
<li><strong>Tablet</strong>: 750px</li>
</ul>
</div>
<div class="six columns">
<ul>
<li><strong>Phablet</strong>: 550px</li>
<li><strong>Mobile</strong>: 400px</li>
</ul>
</div>
</div>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="code-example-body prettyprint">/* Mobile first queries */
/* Larger than mobile */
@media (min-width: 400px) {}
/* Larger than phablet */
@media (min-width: 550px) {}
/* Larger than tablet */
@media (min-width: 750px) {}
/* Larger than desktop */
@media (min-width: 1000px) {}
/* Larger than Desktop HD */
@media (min-width: 1200px) {}
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
<!-- Utilities and Misc. -->
<div class="docs-section" id="utilities">
<h2 class="docs-header">Utilities</h2>
<p>Snippet has a number of small utility classes that act as easy-to-use helpers. Sometimes it's better to use a utility class than create a whole new class just to float an element.</p>
<!-- CODE EXAMPLE ———————————————————————————————————————— -->
<pre class="code-example">
<code class="code-example-body prettyprint">/* Utility Classes */
/* Make element full width */
.u-full-width {
width: 100%;
box-sizing: border-box; }
/* Make sure elements don't run outside containers (great for images in columns) */
.u-max-full-width {
max-width: 100%;
box-sizing: border-box; }
/* Float either direction */
.u-pull-right {
float: right; }
.u-pull-left {
float: left; }
/* Clear a float */
.u-cf {
content: "";
display: table;
clear: both; }
</code>
</pre>
<!-- ————————————————————————————————————————————————————— -->
</div>
</div>
<!-- End Document
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
</body>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/highlight.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</html>