/
_typography.scss
156 lines (133 loc) · 2.8 KB
/
_typography.scss
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
/*
Based on Type-A-File "Field Report" designed by Russ Maschmeyer, aka StrangeNative.
http://www.strangenative.com
@strangenative
Creative Commons License by Attribution.
*/
//
// Fonts
//
html { font-family: Helvetica, Arial, sans-serif; }
pre, code { font-family: Monaco,"DejaVu Sans Mono","Courier New",monospace; }
sup, sub { font-family: arial, sans-serif; }
//
// Size & Vertical Rhythm
//
@include establish-baseline;
//
// Headings
//
h1, h2, h3, h4, h5, h6 { font-weight: 500; }
h2, h3, h4 { @include leader(.5); }
h1 { @include adjust-font-size-to($base-font-size * 2.5); }
h2 { @include adjust-font-size-to($base-font-size * 1.75); }
h3 { @include adjust-font-size-to($base-font-size * 1.3); }
h4 { font-weight: bold; }
h1 + img, h2 + img{ margin-top: 1em; }
//
// HTML Standard Elements
//
small {
display: block;
margin: 2.2em 0 -.2em;
@include small;
}
abbr, pre, code { @include adjust-font-size-to($base-font-size * .9); }
abbr {
text-transform: uppercase;
letter-spacing: .1em;
}
p, pre, ul, ol, form, code {
@include leader;
@include trailer(.7);
}
p, code { margin-bottom: 0; }
p {
hyphenate: auto;
hyphenate-before: 2;
hyphenate-after: 3;
hyphenate-lines: 3;
orphans: 4;
}
em { font-style: italic; }
//
// Code
//
pre {
padding: 10px;
margin-bottom: 0;
overflow: auto;
}
code {
border: 1px solid $content-background-dark;
@include border-radius;
color: $subtle;
padding: 0 5px 2px;
}
//
// Quotes
//
blockquote {
font-style: italic;
@include adjust-leading-to(1.1);
color: $subtle;
margin-left: $gutter-width;
&:before {
font-family: Georgia, serif;
content: "“";
font-size: 2.75em;
text-indent: -.8em;
margin-top: .1em;
float: left;
opacity: .3;
}
}
cite {
display: block;
text-transform: uppercase;
letter-spacing: .2em;
margin-left: 1em;
font-weight: 900;
font-style: normal;
@include leader;
@include adjust-font-size-to($base-font-size * .8);
&:before{
content: "— ";
margin-left: -3.4em;
margin-right: .9em;
opacity: .3;
}
}
//
// Lists
//
ul, ol { list-style-position: outside; }
ul {
list-style-type: disc;
line-height: 1.5;
}
ol { list-style-type: decimal; }
li { margin-bottom: .75em; }
dl {
@include trailer;
@include leader;
dt {
@include leader;
font-weight: 700;
border-bottom: 1px solid $content-background-darker;
}
dd {
@include leader(.5);
}
}
//
// Sup- and subscripts
//
sup, sub {
@include adjust-font-size-to($base-font-size * $font-size-small, 0);
text-transform: lowercase;
font-variant: small-caps;
letter-spacing: .1em;
}
sup { vertical-align: super; }
sub { vertical-align: sub; }