-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_typography.scss
More file actions
183 lines (161 loc) · 4.09 KB
/
_typography.scss
File metadata and controls
183 lines (161 loc) · 4.09 KB
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
// ==========================================================================
// Typography
// ==========================================================================
//
// These are base styles for typographic elements
///
//
// Scales namespace variable
///
$scales-namespace: null !default;
//
// Available Variables
///
$base-text-color: #333333 !default; //http://ianstormtaylor.com/design-tip-never-use-black/
$heading-color: $base-text-color !default;
$text-margins: 0 !default;
$heading-margins: 0 !default;
$measure: 30em !default;
$narrow-measure: 20em !default;
$code-block-padding: 0 1em 1em !default;
$code-block-margins: 0 !default;
$code-block-bg-color: #444444 !default;
$code-block-text-color: #ffffff !default;
$pre-wordwrap: false !default;
// Custom heading utility name variables
$custom-h1-utility-class: alpha !default;
$custom-h2-utility-class: beta !default;
$custom-h3-utility-class: gamma !default;
$custom-h4-utility-class: delta !default;
$custom-h5-utility-class: epsilon !default;
$custom-h6-utility-class: zeta !default;
// Fonts
$monospaced-font-stack: consolas, courier, monospace !default;
$base-font-stack: "Helvetica Neue", helvetica, arial, sans-serif !default;
$heading-font-stack: Times, "Times New Roman", serif !default;
$heading-font-weight: normal !default;
// Font size and line height
$base-font-size: 1rem !default;
//
// For accessibility, $base-line-height should be 1.5 times the $base-font-size
// http://www.w3.org/TR/WCAG20/#visual-audio-contrast-visual-presentation
///
$base-line-height: 1.5 !default;
$lede-font-size: 1.25rem !default;
// Heading sizes
$h1-size: 2.25rem !default;
$h2-size: 2rem !default;
$h3-size: 1.75rem !default;
$h4-size: 1.5rem !default;
$h5-size: 1.25rem !default;
$h6-size: 1rem !default;
//
// Base Typography Styles
///
body {
font-family: $base-font-stack;
font-size: $base-font-size;
line-height: $base-line-height;
color: $base-text-color;
}
p,
.#{$scales-namespace}lede,
.#{$scales-namespace}lead {
margin: $text-margins;
}
//
// Headings
//
// Extra class names allow same font-size to be used on other elements
///
h1,
h2,
h3,
h4,
h5,
h6,
.#{$scales-namespace}h1,
.#{$scales-namespace}h2,
.#{$scales-namespace}h3,
.#{$scales-namespace}h4,
.#{$scales-namespace}h5,
.#{$scales-namespace}h6,
.#{$scales-namespace}#{$custom-h1-utility-class},
.#{$scales-namespace}#{$custom-h2-utility-class},
.#{$scales-namespace}#{$custom-h3-utility-class},
.#{$scales-namespace}#{$custom-h4-utility-class},
.#{$scales-namespace}#{$custom-h5-utility-class},
.#{$scales-namespace}#{$custom-h6-utility-class} {
font-family: $heading-font-stack;
font-weight: $heading-font-weight;
margin: $heading-margins;
color: $heading-color;
}
h1,
.#{$scales-namespace}h1,
.#{$scales-namespace}#{$custom-h1-utility-class} {
font-size: $h1-size;
}
h2,
.#{$scales-namespace}h2,
.#{$scales-namespace}#{$custom-h2-utility-class} {
font-size: $h2-size;
}
h3,
.#{$scales-namespace}h3,
.#{$scales-namespace}#{$custom-h3-utility-class} {
font-size: $h3-size;
}
h4,
.#{$scales-namespace}h4,
.#{$scales-namespace}#{$custom-h4-utility-class} {
font-size: $h4-size;
}
h5,
.#{$scales-namespace}h5,
.#{$scales-namespace}#{$custom-h5-utility-class} {
font-size: $h5-size;
}
h6,
.#{$scales-namespace}h6,
.#{$scales-namespace}#{$custom-h6-utility-class} {
font-size: $h6-size;
}
//
// Lede/Lead - Used to make the intoductory text slightly larger
// http://en.wikipedia.org/wiki/Lead_paragraph
///
.#{$scales-namespace}lede,
.#{$scales-namespace}lead {
font-size: $lede-font-size;
}
// Code blocks
pre,
code {
font-family: $monospaced-font-stack;
font-size: $base-font-size;
}
pre {
@if $pre-wordwrap {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
padding: $code-block-padding;
margin: $code-block-margins;
background-color: $code-block-bg-color;
color: $code-block-text-color;
}
// Measure
.measure {
max-width: $measure;
}
.measure--narrow {
max-width: $narrow-measure
}
// Truncation
.truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}