type.less 5.17 KB
Newer Older
1
2
3
//
// Typography
// --------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
4
5


Mark Otto's avatar
Mark Otto committed
6
7
// Body text
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
8
9

p {
10
  margin: 0 0 (@line-height-base / 2);
Jacob Thornton's avatar
Jacob Thornton committed
11
}
12
.lead {
13
  margin-bottom: @line-height-base;
Mark Otto's avatar
Mark Otto committed
14
  .font-size((@font-size-base * 1.5));
15
  font-weight: 200;
Mark Otto's avatar
Mark Otto committed
16
  line-height: 1.3;
17
}
Jacob Thornton's avatar
Jacob Thornton committed
18

Mark Otto's avatar
Mark Otto committed
19

20
21
22
// Emphasis & misc
// -------------------------

23
24
25
26
27
28
// Ex: 14px base font * 85% = about 12px
small   { font-size: 85%; }

strong  { font-weight: bold; }
em      { font-style: italic; }
cite    { font-style: normal; }
29
30

// Utility classes
31
.muted               { color: @grayLight; }
32
33
a.muted:hover,
a.muted:focus        { color: darken(@grayLight, 10%); }
34

Mark Otto's avatar
Mark Otto committed
35
.text-warning        { color: @state-warning-text; }
36
a.text-warning:hover,
37
a.text-warning:focus { color: darken(@state-warning-text, 10%); }
38

Mark Otto's avatar
Mark Otto committed
39
.text-error          { color: @state-error-text; }
40
a.text-error:hover,
41
a.text-error:focus   { color: darken(@state-error-text, 10%); }
42

Mark Otto's avatar
Mark Otto committed
43
.text-success        { color: @state-success-text; }
44
a.text-success:hover,
45
a.text-success:focus { color: darken(@state-success-text, 10%); }
Mark Otto's avatar
Mark Otto committed
46

47
48
49
50
.text-left           { text-align: left; }
.text-right          { text-align: right; }
.text-center         { text-align: center; }

51

Mark Otto's avatar
Mark Otto committed
52
53
// Headings
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
54

55
56
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
Mark Otto's avatar
Mark Otto committed
57
58
  font-family: @headings-font-family;
  font-weight: @headings-font-weight;
59
  line-height: @line-height-base;
60
  text-rendering: optimizelegibility; // Fix the character spacing for headings
Jacob Thornton's avatar
Jacob Thornton committed
61
  small {
62
    font-weight: normal;
63
    line-height: 1;
64
    color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
65
66
  }
}
67
68

h1,
69
70
h2,
h3 {
Mark Otto's avatar
Mark Otto committed
71
  margin-top: @line-height-base;
72
73
  margin-bottom: (@line-height-base / 2);
  line-height: (@line-height-base * 2);
Mark Otto's avatar
Mark Otto committed
74
}
75
h3 {
76
  line-height: (@line-height-base * 1.5);
77
}
Mark Otto's avatar
Mark Otto committed
78
79
80
h4,
h5,
h6 {
81
82
  margin-top: (@line-height-base / 2);
  margin-bottom: (@line-height-base / 2);
Mark Otto's avatar
Mark Otto committed
83
}
84

85
86
87
88
89
90
91
92
93
94
95
h1, .h1 { font-size: (@font-size-base * 2.75); font-size: 4rem; } // ~38px
h2, .h2 { font-size: (@font-size-base * 2.25); font-size: 3rem; } // ~32px
h3, .h3 { font-size: (@font-size-base * 1.75); font-size: 2.5rem; } // ~24px
h4, .h4 { font-size: (@font-size-base * 1.25); font-size: 2rem; } // ~18px
h5, .h5 { font-size:  @font-size-base; font-size: 1.6rem; }
h6, .h6 { font-size: (@font-size-base * 0.85); font-size: 1.2rem; } // ~12px

h1 small, .h1 small { font-size: (@font-size-base * 1.75); } // ~24px
h2 small, .h2 small { font-size: (@font-size-base * 1.25); } // ~18px
h3 small, .h3 small { font-size: @font-size-base; }
h4 small, .h4 small { font-size: @font-size-base; }
Mark Otto's avatar
Mark Otto committed
96

Jacob Thornton's avatar
Jacob Thornton committed
97

98
// Page header
Mark Otto's avatar
Mark Otto committed
99
100
// -------------------------

101
.page-header {
102
  padding-bottom: ((@line-height-base / 2) - 1);
Mark Otto's avatar
Mark Otto committed
103
  margin: (@line-height-base * 2) 0 @line-height-base;
104
105
106
107
  border-bottom: 1px solid @grayLighter;
}


Jacob Thornton's avatar
Jacob Thornton committed
108

Mark Otto's avatar
Mark Otto committed
109
110
// Lists
// --------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
111
112

// Unordered and Ordered lists
113
114
ul,
ol {
115
  padding: 0;
116
  margin: 0 0 (@line-height-base / 2) 25px;
Jacob Thornton's avatar
Jacob Thornton committed
117
118
119
120
121
122
123
124
}
ul ul,
ul ol,
ol ol,
ol ul {
  margin-bottom: 0;
}
li {
125
  line-height: @line-height-base;
Jacob Thornton's avatar
Jacob Thornton committed
126
}
Mark Otto's avatar
Mark Otto committed
127

128
129
130
131
132
// List options
// Unstyled keeps list items block level, just removes list-style
.list-unstyled,
// Inline turns list items into inline-block
.list-inline {
Jacob Thornton's avatar
Jacob Thornton committed
133
  margin-left: 0;
134
  list-style: none;
Jacob Thornton's avatar
Jacob Thornton committed
135
}
Mark Otto's avatar
Mark Otto committed
136
// Single-line list items
137
138
139
140
.list-inline > li {
  display: inline-block;
  padding-left: 5px;
  padding-right: 5px;
141
}
Jacob Thornton's avatar
Jacob Thornton committed
142
143
144

// Description Lists
dl {
145
  margin-bottom: @line-height-base;
146
147
148
}
dt,
dd {
149
  line-height: @line-height-base;
150
151
152
153
154
}
dt {
  font-weight: bold;
}
dd {
155
  margin-left: (@line-height-base / 2);
Jacob Thornton's avatar
Jacob Thornton committed
156
}
157
// Horizontal layout (like forms)
158
.dl-horizontal {
159
  .clear_float(); // Ensure dl clears floats if empty dd elements present
160
161
  dt {
    float: left;
162
    width: (@component-offset-horizontal - 20);
Jacob Thornton's avatar
Jacob Thornton committed
163
    clear: left;
164
    text-align: right;
Jacob Thornton's avatar
Jacob Thornton committed
165
    .text-overflow();
166
167
  }
  dd {
Mark Otto's avatar
Mark Otto committed
168
    margin-left: @component-offset-horizontal;
169
170
  }
}
Jacob Thornton's avatar
Jacob Thornton committed
171

172
// MISC
173
// ----
Jacob Thornton's avatar
Jacob Thornton committed
174
175
176

// Horizontal rules
hr {
177
  margin: @line-height-base 0;
Jacob Thornton's avatar
Jacob Thornton committed
178
  border: 0;
Mark Otto's avatar
Mark Otto committed
179
  border-top: 1px solid @hr-border;
180
  border-bottom: 1px solid #fff;
181
  border-bottom: 1px solid rgba(255,255,255,.5);
Jacob Thornton's avatar
Jacob Thornton committed
182
183
}

184
// Abbreviations and acronyms
185
186
187
abbr[title],
// Added data-* attribute to help out our tooltip plugin, per https://github.com/twitter/bootstrap/issues/5257
abbr[data-original-title] {
188
  cursor: help;
189
  border-bottom: 1px dotted @grayLight;
190
}
191
192
193
194
abbr.initialism {
  font-size: 90%;
  text-transform: uppercase;
}
195

Jacob Thornton's avatar
Jacob Thornton committed
196
197
// Blockquotes
blockquote {
198
  padding: 0 0 0 15px;
199
  margin: 0 0 @line-height-base;
200
  border-left: 5px solid @grayLighter;
Jacob Thornton's avatar
Jacob Thornton committed
201
202
  p {
    margin-bottom: 0;
203
    font-size: (@font-size-base * 1.25);
204
205
    font-weight: 300;
    line-height: 1.25;
Jacob Thornton's avatar
Jacob Thornton committed
206
  }
207
  small {
Jacob Thornton's avatar
Jacob Thornton committed
208
    display: block;
209
    line-height: @line-height-base;
210
    color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
211
212
213
214
    &:before {
      content: '\2014 \00A0';
    }
  }
215
216
217
218

  // Float right with text-align: right
  &.pull-right {
    float: right;
219
    padding-right: 15px;
Jacob Thornton's avatar
Jacob Thornton committed
220
    padding-left: 0;
221
    border-right: 5px solid @grayLighter;
Jacob Thornton's avatar
Jacob Thornton committed
222
    border-left: 0;
223
224
225
226
    p,
    small {
      text-align: right;
    }
227
228
229
230
231
232
233
234
    small {
      &:before {
        content: '';
      }
      &:after {
        content: '\00A0 \2014';
      }
    }
235
  }
Jacob Thornton's avatar
Jacob Thornton committed
236
237
}

238
// Quotes
239
240
q:before,
q:after,
241
blockquote:before,
242
243
244
245
blockquote:after {
  content: "";
}

Jacob Thornton's avatar
Jacob Thornton committed
246
247
248
// Addresses
address {
  display: block;
249
  margin-bottom: @line-height-base;
250
  font-style: normal;
251
  line-height: @line-height-base;
Jacob Thornton's avatar
Jacob Thornton committed
252
}