forked from typeplate/typeplate.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
965 lines (858 loc) · 40.9 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
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
<!doctype html>
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="robots" content="all">
<title>Typeplate » A typographic starter kit encouraging great type on the Web</title>
<script>
(function() {var config = {kitId: 'wxt4lbk',scriptTimeout: 3000};
var h=document.getElementsByTagName("html")[0];h.className+=" wf-loading";var t=setTimeout(function(){h.className=h.className.replace(/(\s|^)wf-loading(\s|$)/g," ");h.className+=" wf-inactive"},config.scriptTimeout);var tk=document.createElement("script"),d=false;tk.src='//use.typekit.net/'+config.kitId+'.js';tk.type="text/javascript";tk.async="true";tk.onload=tk.onreadystatechange=function(){var a=this.readyState;if(d||a&&a!="complete"&&a!="loaded")return;d=true;clearTimeout(t);try{Typekit.load(config)}catch(b){}};var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(tk,s)
})();
</script>
<meta name="description" content="A typographic starter kit for Web developers and designers, where we don’t make too many design choices, but we do set out patterns for proper markup and “pre-designed” styles.">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="./css/main.css?1.0">
<script src="scripts/vendor/modernizr.min.js"></script>
</head>
<body>
<!-- $banner -->
<header class="header botDivider column" role="banner">
<div class="col-wrap">
<!-- oppa csswizardry style: http://csswizardry.com/2013/01/your-logo-is-still-an-image-and-so-is-mine -->
<a href="." class="logo">
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Typeplate" class="logo-img">
</a>
<nav role="navigation" class="nav nav-primary">
<a href="./demo.html" class="nav-item epsilon">demo</a>
<a href="//github.com/typeplate/typeplate.github.com/blob/master/README.md" class="nav-item epsilon">instructions</a>
<a href="//github.com/TypePlate/typeplate.github.com/issues" class="nav-item epsilon">feedback</a>
</nav>
<nav class="social-nav">
<a href="//github.com/typeplate/typeplate.github.com" class="social-item"><i class="icon-github"></i>Fork</a>
<a href="//twitter.com/typeplate" class="social-item"><i class="icon-twitter"></i>Follow</a>
</nav>
<div class="lede">
<p class="delta">Frameworks make decisions for you about how to organize, structure and design a site. Pattern libraries don’t separate styling and markup, making them tough to use in a truly modular fashion. We weren’t satisfied, so we made a thing that doesn’t do that.</p>
<p><i><b>Typeplate</b></i> is a “typographic starter kit”. We don’t make aesthetic design choices, but define <b>proper markup with extensible styling</b> for common typographic patterns. A stripped-down Sass library concerned with the appropriate technical implementation of design patterns—not how they look.</p>
</div>
</div>
</header>
<nav class="downloads nav">
<div class="col-wrap">
<a href="//raw.github.com/typeplate/typeplate.github.com/master/scss/_typeplate.scss" class="dl-item">
<i class="icon-download"></i>Sass
<hr>
<small>v1.0 | 3kb (17kb raw)</small>
</a>
<a href="https://github.com/typeplate/typeplate-bower" class="dl-item">
<i class="icon-download"></i>Bower pkg
<hr>
<small>v1.0 | 3kb (17kb raw)</small>
</a>
<a href="//raw.github.com/typeplate/typeplate.github.com/master/css/typeplate-unminified.css" class="dl-item">
<i class="icon-download"></i>Raw CSS
<hr>
<small>v1.0 | 6kb</small>
</a>
</div>
</nav>
<div class="col-wrap">
<!-- $table of contents -->
<section class="toc" id="table-of-contents">
<header>
<h1 class="delta center capsify">Table of Contents <b class="icon-download"></b></h1>
</header>
<div id="drawer" class="visuallyhidden">
<!-- 1. Base Type -->
<ol>
<li><a href="#base-type">Base Type</a></li>
<li><a href="#typographic-scale">Typographic Scale</a></li>
<li><a href="#color">Color</a></li>
<li><a href="#word-wrap">Word-wrap</a></li>
</ol>
<!-- 2. Paragraphs -->
<ol>
<li><a href="#indenting">Indenting</a></li>
<li><a href="#hyphenation">Hyphenation</a></li>
</ol>
<!-- 3. Detailing -->
<ol>
<li><a href="#small-caps">Small Capitals</a></li>
<li><a href="#drop-caps">Drop Capitals</a></li>
<li><a href="#unicode-ampersands">Unicode Ampersands</a></li>
<li><a href="#small-print">Small Print</a></li>
</ol>
<!-- 4. Pattern Modules -->
<ol>
<li><a href="#code-blocks">Code Blocks</a></li>
<li><a href="#figures">Figures</a></li>
<li><a href="#block-quotes">Block Quotes</a></li>
<li><a href="#pull-quotes">Pull Quotes</a></li>
<li><a href="#stats-tabs">Stats Tabs</a></li>
<li><a href="#footnotes">Footnotes</a></li>
<li><a href="#definition-lists">Definition Lists</a></li>
</ol>
</div>
</section>
<!-- #base-type -->
<section class="base-type botDivider" id="base-type">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#base-type">§</a> 1.1 Base Type</h1>
</header>
<p>For our base we use the following font settings on our <abbr title="hyper text markup language"><code>HTML</code></abbr> element to standardize the typographic scale in a consistent manner. We also make sure not to use united values for our line-heights per the <a href="http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights" rel="external">recommendations of Mr. Eric Meyer himself</a>.</p>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">$weight: normal;
$line-height: 1.65;
$font-size: 112.5; // percentage value (16 * 112.5% = 18px)
$font-base: 16 * ($font-size/100); // converts our percentage to a pixel value
$font-family: serif;
$font-family-sans: sans-serif;
$font-properties: $weight, $line-height, $font-size, $font-family;
//the serif boolean var can be redeclared from another stylesheet. However
//the var must be placed after your @import "typeplate.scss";
$serif-boolean: true !default;
@mixin base-type($weight, $line-height, $font-size, $font-family...) {
@if $serif-boolean {
font: $weight #{$font-size}%/#{$line-height} $font-family;
}@else {
font: $weight #{$font-size}%/#{$line-height} $font-family-sans;
}
}
html {
@include base-type($font-properties...);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #typographic-scale -->
<section class="typographic-scale botDivider" id="typographic-scale">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#base-type">§</a> 1.2 Typographic Scale</h1>
</header>
<p>Establish clearly distinguishable heading levels with font-size. Don’t randomly pick font sizes, choose a type hierarchy that is harmonious and consistent. Always <a href="http://www.alistapart.com/articles/more-meaningful-typography" rel="external">use a modular scale</a> that calculates those sizes from a ratio ensuring your design and typography can relate in a meaningful way. There’s an excellent calculator for this at <a href="http://modularscale.com" rel="external">modularscale.com</a>.</p>
<blockquote cite="http://www.alistapart.com/articles/more-meaningful-typography">
<p>By using culturally relevant, historically pleasing ratios to create modular scales and basing the measurements in our compositions on values from those scales, we can achieve a visual harmony not found in layouts that use arbitrary, conventional, or easily divisible numbers.</p>
<cite class="author"><small><a href="http://www.alistapart.com/articles/more-meaningful-typography" rel="external">Tim Brown</a></small></cite>
</blockquote>
<figure class="example scale-example">
<p class="giga no-indent">Heading Giga</p>
<p class="mega no-indent">Heading Mega</p>
<p class="alpha no-indent">Heading Alpha</p>
<p class="beta no-indent">Heading Beta</p>
<p class="gamma no-indent">Heading Gamma</p>
<p class="delta no-indent">Heading Delta</p>
<p class="epsilon no-indent">Heading Epsilon</p>
<p class="zeta no-indent">Heading Zeta</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><h1 class="giga">Heading Giga</h1>
<h1 class="mega">Heading Mega</h1>
<h1 class="alpha">Heading Alpha</h1>
<h2 class="beta">Heading Beta</h2>
<h3 class="gamma">Heading Gamma</h3>
<h4 class="delta">Heading Delta</h4>
<h5 class="epsilon">Heading Epsilon</h5>
<h6 class="zeta">Heading Zeta</h6></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">$measure: $font-base * $line-height;
// Modular Scale Values
$tera: 117; // 117 = 18 × 6.5
$giga: 90; // 90 = 18 × 5
$mega: 72; // 72 = 18 × 4
$alpha: 60; // 60 = 18 × 3.3333
$beta: 48; // 48 = 18 × 2.6667
$gamma: 36; // 36 = 18 × 2
$delta: 24; // 24 = 18 × 1.3333
$epsilon: 21; // 21 = 18 × 1.1667
$zeta: 18; // 18 = 18 × 1
// typscale unit
$type-scale-unit-value: rem;
// $Typographic scale
@mixin modular-scale($scale, $base, $value, $measure:"") {
font-size: $scale#{px};
font-size: modular-scale($scale, $base, $value);
@if $measure != "" {
margin-bottom: measure-margin($scale, $measure, $value);
}
}
@function modular-scale($scale, $base, $value) {
// divide a given font-size by base font-size & return a relative em value
@return ($scale/$base)#{$value};
}
@function measure-margin($scale, $measure, $value) {
// divide 1 unit of measure by given font-size & return a relative em value
@return ($measure/$scale)#{$value};
}
// styles for all headings, in the style of @csswizardry
%hN {
// voodoo to enable ligatures and kerning
text-rendering: optimizeLegibility;
// this fixes huge spaces when a heading wraps onto two lines
line-height: 1;
margin-top: 0;
}
// make a multi-dimensional array, where:
// the first value is the name of the class
// and the second value is the variable for the size
$sizes: tera $tera, giga $giga, mega $mega, alpha $alpha, beta $beta, gamma $gamma, delta $delta, epsilon $epsilon, zeta $zeta;
// associate h1-h6 tags with their appropriate greek heading
@each $size in $sizes {
.#{nth($size, 1)} {
@include modular-scale(nth($size, 2), $font-base, '#{$type-scale-unit-value}', $measure);
}
}
// associate h1-h6 tags with their appropriate greek heading
h1 { @extend .alpha; @extend %hN; }
h2 { @extend .beta; @extend %hN; }
h3 { @extend .gamma; @extend %hN; }
h4 { @extend .delta; @extend %hN; }
h5 { @extend .epsilon; @extend %hN; }
h6 { @extend .zeta; @extend %hN; }</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #color -->
<section class="color botDivider" id="color">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#color">§</a> 1.3 Color</h1>
</header>
<p>Just like in print, don’t use the darkest black available in your body text (#000). Instead, go for something softer, like #444. You can use a slightly darker color for titles (#222).</p>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">$body-copy-color: #444;
$heading-color: #222;
body {
color: $body-copy-color;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: $heading-color;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #word-wrap -->
<section class="word-wrap botDivider" id="word-wrap">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#color">§</a> 1.4 Word-wrap</h1>
</header>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odio iste voluptates saepe ipsa magni repellendus explicabo numquam expedita dolore eveniet accusantium iure sit consequatur? Dolore minus vel blanditiis velit deserunt! We’ll also be checking a few things like the longest word in the world “Methionylthreonylthreonylglutaminylarginylisoleucine” and other stuff like links that are way long such as <a href="http://google.com" rel="external">“Methionylthreonylthreonylglutaminylarginylisoleucine”</a> and other long links like <a href="http://google.com" rel="external">http://192.168.1.100/somedirectory/stayout/of/my/shit</a></p>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">// Silent Sass Classes - A.K.A Placeholders
//
// normal: Indicates that lines may only break at normal word break points.
// break-word : Indicates that normally unbreakable words may be broken at ...
// arbitrary points if there are no otherwise acceptable break points in the line.
%breakword {
word-wrap: breakword;
}
%normal-wrap {
word-wrap: normal;
}
%auto-wrap {
word-wrap: auto;
}
body {
@extend %breakword;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #indenting -->
<section class="indenting botDivider" id="indenting">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#indenting">§</a> 2.1 Indenting</h1>
</header>
<p>The common way of styling paragraphs is handling them as blocks with margins on top and bottom, which is what browsers do by default. If you want to stand out, use indented paragraphs. It’s pretty easy to establish with the mixin we’ve provided.</p>
<figure class="example no-top-pad">
<p>I crawled out almost immediately, and crouched, my feet still in the water, under a clump of furze. The horse lay motionless (his neck was broken, poor brute!) and by the lightning flashes I saw the black bulk of the overturned dog cart and the silhouette of the wheel still spinning slowly. In another moment the colossal mechanism went striding by me, and passed uphill towards Pyrford.</p>
<p>Seen nearer, the Thing was incredibly strange, for it was no mere insensate machine driving on its way. Machine it was, with a ringing metallic pace, and long, flexible, glittering tentacles (one of which gripped a young pine tree) swinging and rattling about its strange body.</p>
<p>It picked its road as it went striding along, and the brazen hood that surmounted it moved to and fro with the inevitable suggestion of a head looking about. Behind the main body was a huge mass of white metal like a gigantic fisherman’s basket, and puffs of green smoke squirted out from the joints of the limbs as the monster swept by me. And in an instant it was gone.</p>
<p>So much I saw then, all vaguely for the flickering of the lightning, in blinding highlights and dense black shadows.</p>
<p>As it passed it set up an exultant deafening howl that drowned the thunder—“Aloo! Aloo!”—and in another minute it was with its companion, half a mile away, stooping over something in the field. I have no doubt this Thing in the field was the third of the ten cylinders they had fired at us from Mars.</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">//paragraph siblings indent
$indent-val: 1.5em;
p {
& + p {
text-indent: $indent-val;
}
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #hyphenation -->
<section class="hyphenation botDivider" id="hyphenation">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#hyphenation">§</a> 2.2 Hyphenation</h1>
</header>
<p>Responsive or not, there’s no reason why we shouldn’t all be designing and building sites on flexible foundations. In a fluid layout, browser width and typographic measure are linked: the wider the viewport, the more characters per line. Keeping in mind that a range of 45-75 characters per line is generally accepted as safe for comfortable reading, there are a few things that can be done to avoid extra long lines of text in fluid layouts. <a href="http://www.amazon.com/Elements-Typographic-Style-Robert-Bringhurst/dp/0881792063" rel="external">Robert Bringhurst</a> recommends for us to leave at least two characters behind and take at least three forward.</p>
<blockquote cite="http://nicewebtype.com/notes/2013/01/16/where-to-avoid-css-hyphenation">
<p>Since hyphens is an inherited property, it isn’t sufficient to set it for a limited number of elements and assume you’re done. You have to make sure you’ve turned it off for the elements that shouldn’t be hyphenated.</p>
<cite class="author"><small><a href="http://meyerweb.com/eric/thoughts/2012/12/17/where-to-avoid-css-hyphenation/" rel="external">Eric Meyer</a></small></cite>
</blockquote>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin css-hyphens($val) {
// Accepted values: [ none | manual | auto ]
-webkit-hyphens: $val; // Safari 5.1 thru 6, iOS 4.2 thru 6
-moz-hyphens: $val; // Firefox 16 thru 20
-ms-hyphens: $val; // IE10
hyphens: $val; // W3C standard
};
body {
//Ala Trent Walton
//http://trentwalton.com/2011/09/07/css-hyphenation
@include css-hyphens(auto);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #small-capitals -->
<section class="small-caps botDivider" id="small-caps">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#small-caps">§</a> 3.1 Small Capitals</h1>
</header>
<p>Small caps help to make abbreviations way easier to read but won’t stand out from the text. We highly suggest this bit of typographic flare with your content. True small capitals are now possible on the web, <a href="http://blog.hypsometry.com/articles/true-small-capitals-with-font-face" rel="external">but alas they are still a bitch</a> and will also depend on the type face in use. Definitely check out <a href="//opentypography.org/fontlist.html" rel="external">Open Typography</a> for those typefaces and services that provide authentic small caps.</p>
<figure class="example no-top-pad">
<p>Lorem ipsum dolor sit amet, consectetur <abbr title="hyper text markup language">HTML</abbr> adipisicing elit. <abbr title="cascading styling sheets">CSS</abbr> Laboriosam voluptatem a beatae accusantium accusamus dolor provident error consectetur quibusdam suscipit neque temporibus. Velit omnis voluptatum quasi tempora reiciendis expedita reprehenderit.</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><abbr title="hyper text markup language">HMTL</abbr></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-css">@mixin smallcaps($color, $font-weight) {
// depends on the font family.
// some font-families don’t support small caps
// or don’t provide them with their web font.
font-variant: small-caps;
font-weight: $font-weight;
text-transform: lowercase;
color: $color;
}
abbr {
@include smallcaps(gray, 600);
&:hover {
cursor: help;
}
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #drop-capitals -->
<section class="drop-capitals botDivider" id="drop-caps">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#drop-caps">§</a> 3.2 Drop Capitals</h1>
</header>
<p>A Drop Cap is the art of using an uppercase glyph to mark the start of copy. A technique that has been around for almost two thousand years!</p>
<figure class="example">
<p class="drop-cap">There now is your insular city of the Manhattoes, belted round by wharves as Indian isles by coral reefs—commerce surrounds it with her surf. Right and left, the streets take you waterward. Its extreme downtown is the battery, where that noble mole is washed by waves, and cooled by breezes, which a few hours previous were out of sight of land. Look at the crowds of water-gazers there.</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><p class="drop-cap">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Unde in aliquid rem. Esse laboriosam nisi quas eveniet atque consequatur perferendis nostrum dignissimos magni cum suscipit delectus nam placeat qui rem.</p></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">// Use ‘@include dropcap()’ with any selector. Pass in your own custom
// arguments or feel free to use the arguments we’ve provided.
@mixin dropcap($float: left, $font-size: 4em, $font-family: inherit, $text-indent: 0, $margin: inherit, $padding: inherit, $color: inherit, $lineHeight: 1, $bg: transparent) {
&:first-letter {
float: $float;
margin: $margin;
padding: $padding;
font-size: $font-size;
font-family: $font-family;
line-height: $lineHeight;
text-indent: $text-indent;
background: $bg;
color: $color;
}
}
// Including the @mixin with our .drop-cap class purely for demo purposes.
// Not included in the actual Typeplate Sass or CSS download.
.drop-cap {
@include dropcap($margin: 0 .5em auto 0, $padding: .5em, $color: #fff, $bg: #333);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #unicode-ampersands -->
<section class="ampersands botDivider" id="unicode-ampersands">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#unicode-ampersands">§</a> 3.3 Unicode Ampersands</h1>
</header>
<p>With the <code>unicode-range</code> property we can avoid using verbose markup and only target the charcters we like according to the unicode unique identifier. We also harness the power of the <code>%placeholder</code> in Sass allowing like minded selectors to string together this shared property in a DRY way from one single declaration. Copy and paste the Sass below into <a href="http://codepen.io/pen" rel="external">Codepen</a> and check out the output for yourself. Hint: create multiple classes.</p>
<figure class="example amp-example">
<p class="amp">Amper & Sands</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">//Unicode Ampersand @font-face
$amp-fontface-name: Ampersand;
$amp-fontface-source: local('Georgia'), local('Garamond'), local('Palatino'), local('Book Antiqua');
$amp-fontface-fallback: local('Georgia');
// Allows for our ampersand element to have differing
// font-family from the ampersand unicode font-family.
$amp-font-family: Verdana, sans-serif;
@font-face {
font-family: '#{$amp-fontface-name}';
src: $amp-fontface-source;
unicode-range: U+0026;
}
// Ampersand fallback font for unicode range
@font-face {
font-family: '#{$amp-fontface-name}';
src: $amp-fontface-fallback;
unicode-range: U+270C;
}
@mixin ampersand($amp-font-family...) {
font-family: $amp-font-family;
}
%ampersand-placeholder {
@include ampersand($amp-fontface-name, $amp-font-family);
}
// Call your ampersand on any element you wish from another stylesheet
// using this Sass extend we’ve provided.
.amp {
@extend %ampersand-placeholder;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #small-print -->
<section class="small-print botDivider" id="small-print">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#code-blocks">§</a> 3.4 Small Print</h1>
</header>
<p>The <code>small</code> element is used to represent side comments or what’s commonly referred to as ‘small print’: disclaimers, caveats, legal restrictions, or copyrights. It can also be used for attributions or satisfying licensing requirements.</p>
<blockquote cite="http://html5doctor.com/small-hr-element/">
<p><code>small</code> is now for side comments, which are the inline equivalent of <code>aside</code>—content which is not the main focus of the page. A common example is inline legalese, such as a copyright statement in a page footer, a disclaimer, or licensing information. It can also be used for attribution. Don’t use it for block-level content (paragraphs, lists, etc.), as this would be considered main content.</p>
<p><code>small</code> text does not need to be smaller than surrounding text—if all you want is smaller text use CSS instead. Use <code>small</code> only on inline content.</p>
<cite>
<small><a href="http://html5doctor.com/small-hr-element/">Oli Studholme</a></small>
</cite>
</blockquote>
<figure class="example no-top-pad">
<p class="zeta">Buy one widget, get one free!
<small>(While supplies last. Offer expires on the vernal equinox. Not valid in Ohio.)</small>
</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><small>(While supplies last. Offer expires on the vernal equinox. Not valid in Ohio.)</small></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">small {
font-size: 65%;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- $Code Blocks -->
<section class="code-blocks botDivider" id="code-blocks">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#code-blocks">§</a> 4.1 Code Blocks</h1>
</header>
<p><code>Monospace</code> fonts just like you like for all your code block dreams! Monospace fonts or <i>“fixed pitch”</i> fonts, contain characters that all have the same character width. ‘l’, ‘1’ and ‘i’ are easily distinguished with monospace, ‘0’, ‘o’ and ‘O’ are easily distinguished and clear punctuation characters, especially braces, parenthesis and brackets.</p>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">h1 {
background: red;
color: blue;
padding: 1em;
margin: 3em;
border: 2px solid black;
}</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin white-space($wrap-space) {
@if $wrap-space == 'pre-wrap' {
white-space: #{-moz-}$wrap-space; // Firefox 1.0-2.0
white-space: $wrap-space; // current browsers
} @else {
white-space: $wrap-space;
}
}
pre code {
@extend %normal-wrap;
@include white-space(pre-wrap);
}
pre {
@include white-space(pre);
}
code {
@include white-space(pre);
font-family: monospace;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #figures -->
<!-- [1/6/13 7:09:04 PM] Zak Kain: I think what’s missing here is the html markup component, for the more complex sections (like figure). Setting some baseline CSS for figure is difficult without being too restrictive in styling, but you can offer markup patterns for "how to do a proper figure with caption, citation etc". Same goes for blockquotes (which I have a lot of work on actually, I’ll pull-request you when this is live) -->
<section class="figures botDivider" id="figures">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#figures">§</a> 4.2 Figures</h1>
</header>
<figure class="example">
<img src="http://designingfortheweb.co.uk/book/images/typography-anatomy_b.gif" alt="">
<figcaption class="example-figcaption">
<strong>Fig. 4.2 | </strong>Type Anatomy, an excerpt from Mark Boulton’s book <cite title="http://designingfortheweb.co.uk/book/part3/part3_chapter11.php">“Designing for the Web”</cite>
</figcaption>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><figure>
<figcaption>
<strong>Fig. 4.2 | </strong>Type Anatomy, an excerpt from Mark Boulton's book<cite title="http://designingfortheweb.co.uk/book/part3/part3_chapter11.php">“Designing for the Web”</cite>
</figcaption>
</figure></code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #block-quotes -->
<!-- http://html5doctor.com/blockquote-q-cite -->
<section class="block-quotes botDivider" id="block-quotes">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#block-quotes">§</a> 4.3 Block Quotes</h1>
</header>
<p>The blockquote element represents a section that is being quoted from another source.</p>
<figure class="example no-top-pad">
<blockquote cite="http://where-i-got-my-info-from.com">
<p>“Embracing the fluid & flexible aspect of responsive web design was an easy decision, but I’ve been less sure-footed when it comes to balancing that with setting type on the web”</p>
<cite>
<small><a href="http://trentwalton.com/2012/06/19/fluid-type">Trent Walton</a></small>
</cite>
</blockquote>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><blockquote cite="">
<p>&Prime;&Prime;</p>
<cite>
<small><a href=""></a></small>
</cite>
</blockquote></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin cite-style($display:block, $text-align:right, $font-size: .875em) {
display: $display;
font-size: $font-size;
text-align: $text-align;
}
%cite {
@include cite-style;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #pull-quotes -->
<!-- http://24ways.org/2005/swooshy-curly-quotes-without-images -->
<!-- http://www.smashingmagazine.com/2008/06/12/block-quotes-and-pull-quotes-examples-and-good-practices/ -->
<section class="pull-quotes botDivider" id="pull-quotes">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#pull-quotes">§</a> 4.4 Pull Quotes</h1>
</header>
<p>Pull Quotes are tricky, but with this little ditty they’re not so difficult or tedious anymore. The example is an improvement based upon the <a href="http://24ways.org/2005/swooshy-curly-quotes-without-images" rel="external" target="blank">24 ways article discussing swooshy curly quotes without images.</a> This particular example depicted takes advantage of psuedo selectors and the <code><aside></code> tag.</p>
<figure class="example no-top-pad pull-example">
<aside class="pull-quote">
<blockquote>
<p>Most people who use Helvetica, use it because it's ubiquitous. It's like going to McDonald's instead of thinking about food. Because it's there, it's on every street corner, so let's eat crap because it's on the corner.</p>
</blockquote>
</aside>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><aside class="pull–quote">
<blockquote>
<p></p>
</blockquote>
</aside></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin pull-quotes($font-size, $opacity) {
position: relative;
padding: ems($font-size, $font-size);
&:before,
&:after {
height: ems($font-size, $font-size);
opacity: $opacity;
position: absolute;
font-size: $font-size;
}
&:before {
content: '“';
top: 0em;
left: 0em;
}
&:after {
content: '”';
bottom: 0em;
right: 0em;
}
}
.pull-quote {
@include pull-quotes(4em, .15);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #stats-tabs -->
<section class="stats botDivider" id="stats-tabs">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#stats-tabs">§</a> 4.6 Stats Tabs ala Pears</h1>
</header>
<figure class="example no-top-pad">
<ul class="stats-tabs">
<li><a href="#">1,234 <b>Stratocasters</b></a></li>
<li><a href="#">567 <b>Acoustic</b></a></li>
<li><a href="#">23,456 <b>Banjo</b></a></li>
<li><a href="#">3,456 <b>Dulcimer</b></a></li>
<li><a href="#">456 <b>Ukes</b></a></li>
<li><a href="#">26 <b>Bass Guitar</b></a></li>
</ul>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><!-- Stats Tabs -->
<ul class="stats-tabs">
<li><a href="#">[value]<b>[name]</b></a></li>
</ul></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">//Stats Tabs Variables
$stats-font-size: 1.125rem;
$stats-list-margin: 0 0.625rem 0 0;
$stats-list-padding: 0 0.625rem 0 0;
$stats-item-font-size: 0.1875rem;
$stats-item-margin: 0.125rem 0 0 0;
$stats-border-style: 0.125rem solid #ccc;
// Stats Tabs Styles
.stats-tabs {
li {
display: inline-block;
margin: $stats-list-margin;
padding: $stats-list-padding;
border-right: $stats-border-style;
&:last-child {
margin: 0;
padding: 0;
border: none;
}
a {
//float: left;
display: inline-block;
font-size: $stats-font-size;
font-weight: bold;
span {
display: block;
margin: $stats-item-margin;
font-size: $stats-item-font-size;
font-weight: normal;
}
}
}
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #footnotes -->
<section class="footnotes botDivider" id="footnotes">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#footnotes">§</a> 4.7 Footnotes</h1>
</header>
<figure class="example no-top-pad">
<article>
<p>The sites we’ve built to display on a desktop, smartphone, or a tablet today could be on a TV Screen, coffee table display, or mega space yacht projection system tomorrow. Do yourself a favor and heed the advice of the Dao: A fully-scalable web<sup><a href="#fn-item1" id="fn-return">1</a></sup></p>
<footer class="foot-note">
<ol>
<li id="fn-item1">Style sheets that use relative units can more easily scale from one output environment to another. Most of the time I use em and rem. <a href="#fn-return">↩</a></li>
</ol>
</footer>
</article>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><!-- Footnote Markup : Replace ‘X” with your unique number for each footnote -->
<article>
<p><sup><a href="#fn-itemX" id="fn-returnX"></a></sup></p>
<footer>
<ol class="foot-notes">
<li id="fn-itemX"><a href="#fn-returnX">↩</a></li>
</ol>
</footer>
</article></code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #definition-lists -->
<section class="definition-lists botDivider" id="definition-lists">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#definition-lists">§</a> 4.8 Definition Lists</h1>
</header>
<p>The dl element is for another type of list called a definition list. Instead of list items, the content of a dl consists of dt (Definition Term) and dd (Definition Description) pairs.</p>
<p>TypePlate offers several different patterns for definition lists. In all three of the examples below, the contents of dts are wrapped in b tags, and a class of .micro is given to the contents of dds. First is the default format for definitions lists.</p>
<h3 class="delta">a) Multi-line Definitions (default)</h3>
<figure class="example no-top-pad">
<dl>
<dt><b>This is a term</b></dt>
<dd>this is the definition of that term, which both live in a <code>dl</code>.</dd>
<dt><b>Another Term</b></dt>
<dd>And it gets a definition too, which is this line</dd>
<dd>This is a 2<sup>nd</sup> definition for a single term. A <code>dt</code> may be followed by multiple <code>dd</code>s.</dd>
</dl>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><dl>
<dt><b></b></dt>
<dd></dd>
</dl></code></pre>
</figure>
<h3 class="delta">b) Inline Definitions</h3>
<p>The second format for definition lists is lining. This style is more robust, with support for multiple terms defined by a single definition, and applies proper punctuation (: ,) where appropriate:</p>
<figure class="example no-top-pad">
<dl class="lining">
<dt><b>This is a term</b></dt>
<dd>this is the definition of that term, which both live in a <code>dl</code>.</dd>
<dt><b>Another Term</b></dt>
<dd class="micro">And it gets a definition too, which is this line</dd>
<dd class="micro"> this is a 2<sup>nd</sup> definition for a single term.</dd>
<dt><b>Term</b></dt>
<dt><b>Other Defined Term</b></dt>
<dd><code>dt</code> terms may stand on their own without an accompanying <code>dd</code>, but in that case they <em>share</em> descriptions with the next available <code>dt</code>. You may not have a <code>dd</code> without a parent <code>dt</code>.</dd>
</dl>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><dl class="lining">
<dt><b></b></dt>
<dd></dd>
</dl></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin definition-list-style($style) {
// lining style
@if $style == lining {
dt, dd {
display: inline;
margin: 0;
}
dt, dd {
& + dt {
&:before {
content: "\A";
white-space: pre;
}
}
}
dd {
& + dd {
&:before {
content: ", ";
}
}
&:before {
content: ": ";
margin-left: -0.2rem; // removes extra space between the dt and the colon
}
}
}
}
dl {
@include definition-list-style(lining);
}</code></pre>
</figure>
<h3 class="delta">c) Dictionary-style Definition</h3>
<p>The third format for definition lists is dictionary. This style is more a formal, applying proper punctuation where necessary and includes ordinal indicators:</p>
<figure class="example no-top-pad">
<dl class="dictionary-style">
<dt><b>This is a term</b></dt>
<dd>this is the definition of that term, which both live in a <code>dl</code>.</dd>
<dt><b>Another Term</b></dt>
<dd>And it gets a definition too, which is this line</dd>
<dd> this is a 2<sup>nd</sup> definition for a single term.</dd>
<dt><b>Term</b></dt>
<dt><b>Other Defined Term</b></dt>
<dd><code>dt</code> terms may stand on their own without an accompanying <code>dd</code>, but in that case they <em>share</em> descriptions with the next available <code>dt</code>. You may not have a <code>dd</code> without a parent <code>dt</code>.</dd>
</dl>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup"><dl class="dictionary-style">
<dt><b></b></dt>
<dd></dd>
<dt><b></b></dt>
<dd></dd>
<dd></dd>
<dt><b></b></dt>
<dd></dd>
</dl></code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin definition-list-style($style) {
// dictionary-style
@if $style == dictionary-style {
dt {
display: inline;
counter-reset: definitions;
& + dt {
&:before {
content: ", ";
margin-left: -0.2rem; /* removes extra space between the dt and the comma */
}
}
}
dd {
display: block;
counter-increment: definitions;
&:before {
content: counter(definitions, decimal) ". ";
}
}
}
}
dl {
@include definition-list-style(dictionary-style);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<footer role="contentinfo" class="site-footer">
<p>Copyright ©2013. TypePlate is a <a href="https://twitter.com/gryghostvisuals">@gryghostvisuals</a> and <a href="https://twitter.com/zakkain">@zakkain</a> Joint<sup>™</sup> Logo Crafting by <a href="https://twitter.com/TommyCreenan">@TommyCreenan</a>.</p>
</footer>
</div><!-- end last col-wrap -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/js/vendor/jquery.min.js"><\/script>')</script>
<script src="/js/minified/main-min.js"></script>
<script>
var _gaq=[['_setAccount','UA-38761755-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>