type.less 3.11 KB
Newer Older
1
/* Typography.less
2
 * Headings, body text, lists, code, and more for a versatile and durable typography system
3
 * ---------------------------------------------------------------------------------------- */
Jacob Thornton's avatar
Jacob Thornton committed
4
5


6
// BODY TEXT
7
// ---------
Jacob Thornton's avatar
Jacob Thornton committed
8
9

p {
10
11
12
13
  font-family: @baseFontFamily;
  font-size: @baseFontSize;
  line-height: @baseLineHeight;
  margin-bottom: @baseLineHeight / 2;
Jacob Thornton's avatar
Jacob Thornton committed
14
  small {
15
    font-size: @baseFontSize - 2;
16
    color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
17
18
19
  }
}

20
21

// HEADINGS
22
// --------
Jacob Thornton's avatar
Jacob Thornton committed
23
24

h1, h2, h3, h4, h5, h6 {
25
  font-weight: bold;
26
  color: @grayDark;
27
  text-rendering: optimizelegibility;
Jacob Thornton's avatar
Jacob Thornton committed
28
  small {
29
    color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
30
31
32
33
  }
}
h1 {
  font-size: 30px;
34
  line-height: @baseLineHeight * 2;
Jacob Thornton's avatar
Jacob Thornton committed
35
36
37
38
39
40
  small {
    font-size: 18px;
  }
}
h2 {
  font-size: 24px;
41
  line-height: @baseLineHeight * 2;
Jacob Thornton's avatar
Jacob Thornton committed
42
  small {
43
    font-size: 18px;
Jacob Thornton's avatar
Jacob Thornton committed
44
45
46
  }
}
h3 {
47
  line-height: @baseLineHeight * 1.5;
Jacob Thornton's avatar
Jacob Thornton committed
48
49
50
51
52
53
54
  font-size: 18px;
  small {
    font-size: 14px;
  }
}
h4 {
  font-size: 16px;
55
  line-height: @baseLineHeight * 2;
Jacob Thornton's avatar
Jacob Thornton committed
56
57
58
59
60
61
  small {
    font-size: 12px;
  }
}
h5 {
  font-size: 14px;
62
  line-height: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
63
64
65
}
h6 {
  font-size: 13px;
66
  line-height: @baseLineHeight;
67
  color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
68
69
70
71
  text-transform: uppercase;
}


72
// COLORS
73
// ------
Jacob Thornton's avatar
Jacob Thornton committed
74
75
76

// Unordered and Ordered lists
ul, ol {
77
  margin: 0 0 @baseLineHeight 25px;
Jacob Thornton's avatar
Jacob Thornton committed
78
79
80
81
82
83
84
85
86
87
88
89
90
91
}
ul ul,
ul ol,
ol ol,
ol ul {
  margin-bottom: 0;
}
ul {
  list-style: disc;
}
ol {
  list-style: decimal;
}
li {
92
  line-height: @baseLineHeight;
93
  color: @grayDark;
Jacob Thornton's avatar
Jacob Thornton committed
94
95
96
97
98
99
100
101
}
ul.unstyled {
  list-style: none;
  margin-left: 0;
}

// Description Lists
dl {
102
  margin-bottom: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
103
  dt, dd {
104
    line-height: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
105
106
107
108
109
  }
  dt {
    font-weight: bold;
  }
  dd {
110
    margin-left: @baseLineHeight / 2;
Jacob Thornton's avatar
Jacob Thornton committed
111
112
113
  }
}

114
// MISC
115
// ----
Jacob Thornton's avatar
Jacob Thornton committed
116
117
118

// Horizontal rules
hr {
119
  margin: 20px 0 19px;
Jacob Thornton's avatar
Jacob Thornton committed
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
  border: 0;
  border-bottom: 1px solid #eee;
}

// Emphasis
strong {
  font-style: inherit;
  font-weight: bold;
}
em {
  font-style: italic;
  font-weight: inherit;
  line-height: inherit;
}
.muted {
135
  color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
136
137
}

138
139
140
141
142
143
144
145
// Abbreviations and acronyms
abbr {
  font-size: 90%;
  text-transform: uppercase;
  border-bottom: 1px dotted #ddd;
  cursor: help;
}

Jacob Thornton's avatar
Jacob Thornton committed
146
147
// Blockquotes
blockquote {
148
  margin-bottom: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
149
150
151
  border-left: 5px solid #eee;
  padding-left: 15px;
  p {
152
    #font > .shorthand(300,14px,@baseLineHeight);
Jacob Thornton's avatar
Jacob Thornton committed
153
154
    margin-bottom: 0;
  }
155
  small {
Jacob Thornton's avatar
Jacob Thornton committed
156
    display: block;
157
    #font > .shorthand(300,12px,@baseLineHeight);
158
    color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
159
160
161
162
163
164
165
166
167
    &:before {
      content: '\2014 \00A0';
    }
  }
}

// Addresses
address {
  display: block;
168
169
  line-height: @baseLineHeight;
  margin-bottom: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
170
171
172
173
174
}

// Inline and block code styles
code, pre {
  padding: 0 3px 2px;
175
  font-family: Menlo, Monaco, Andale Mono, Courier New, monospace;
Jacob Thornton's avatar
Jacob Thornton committed
176
177
178
179
180
181
  font-size: 12px;
  .border-radius(3px);
}
code {
  background-color: lighten(@orange, 40%);
  color: rgba(0,0,0,.75);
Mark Otto's avatar
Mark Otto committed
182
  padding: 1px 3px;
Jacob Thornton's avatar
Jacob Thornton committed
183
184
185
186
}
pre {
  background-color: #f5f5f5;
  display: block;
187
188
189
  padding: (@baseLineHeight - 1) / 2;
  margin: 0 0 @baseLineHeight;
  line-height: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
190
  font-size: 12px;
191
  border: 1px solid #ccc;
Jacob Thornton's avatar
Jacob Thornton committed
192
193
  border: 1px solid rgba(0,0,0,.15);
  .border-radius(3px);
194
  white-space: pre;
Jacob Thornton's avatar
Jacob Thornton committed
195
  white-space: pre-wrap;
196
197
  word-wrap: break-word;

198
}