type.less 2.97 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;
Jacob Thornton's avatar
Jacob Thornton committed
27
  small {
28
    color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
29
30
31
  }
}
h1 {
32
  margin-bottom: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
33
  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
43
44
45
46
  small {
    font-size: 14px;
  }
}
h3 {
47
  line-height: @baseLineHeight * 2;
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;
Jacob Thornton's avatar
Jacob Thornton committed
93
94
95
96
97
98
99
100
101
  color: @gray;
}
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
}

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

// Addresses
address {
  display: block;
160
161
  line-height: @baseLineHeight;
  margin-bottom: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
162
163
164
165
166
}

// Inline and block code styles
code, pre {
  padding: 0 3px 2px;
167
  font-family: Menlo, Monaco, Andale Mono, Courier New, monospace;
Jacob Thornton's avatar
Jacob Thornton committed
168
169
170
171
172
173
  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
174
  padding: 1px 3px;
Jacob Thornton's avatar
Jacob Thornton committed
175
176
177
178
}
pre {
  background-color: #f5f5f5;
  display: block;
179
180
181
  padding: (@baseLineHeight - 1) / 2;
  margin: 0 0 @baseLineHeight;
  line-height: @baseLineHeight;
Jacob Thornton's avatar
Jacob Thornton committed
182
  font-size: 12px;
183
  border: 1px solid #ccc;
Jacob Thornton's avatar
Jacob Thornton committed
184
185
  border: 1px solid rgba(0,0,0,.15);
  .border-radius(3px);
186
  white-space: pre;
Jacob Thornton's avatar
Jacob Thornton committed
187
  white-space: pre-wrap;
188
189
  word-wrap: break-word;

190
}