1
+ /**
2
+ * Copyright 2013 The Rust Project Developers. See the COPYRIGHT
3
+ * file at the top-level directory of this distribution and at
4
+ * http://rust-lang.org/COPYRIGHT.
5
+ * With elements taken from Bootstrap v3.0.0 (Apache v2.0 licensed).
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
8
+ * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
9
+ * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
10
+ * option. This file may not be copied, modified, or distributed
11
+ * except according to those terms.
12
+ */
13
+ /* Global page semantics
14
+ ========================================================================== */
1
15
body {
2
- padding : 1em 6em ;
3
- margin : 0 ;
4
- margin-bottom : 4em ;
5
- font-family : "Helvetica Neue" , Helvetica, sans-serif;
6
- font-size : 12pt ;
7
- color : black;
8
- line-height : 1.6em ;
9
- min-width : 45em ;
10
- max-width : 60em ;
16
+ background-color : # fff ;
17
+ margin : 0 auto;
18
+ padding : 0 15px ;
19
+ margin-bottom : 4em ;
20
+ font-family : "Helvetica Neue" , Helvetica, Arial, sans-serif;
21
+ font-size : 14px ;
22
+ color : # 333 ;
23
+ line-height : 1.428571429 ;
11
24
}
12
-
13
- h1 {
14
- font-size : 24pt ;
15
- margin-top : 1.6em ;
16
- padding-left : 0.4em ;
17
- line-height : 1.6em ;
18
- background-color : # FFF2CE ;
19
- border-radius : 0.2em ;
25
+ @media (min-width : 768px ) {
26
+ body {
27
+ max-width : 750px ;
28
+ }
20
29
}
21
-
22
- h2 {
23
- font-size : 16pt ;
24
- margin-top : 1.6em ;
25
- padding : 0.2em 0.5em ;
26
- background-color : # FFF2CE ;
27
- border-radius : 0.4em ;
30
+ @media (min-width : 992px ) {
31
+ body {
32
+ max-width : 970px ;
33
+ }
28
34
}
29
-
30
- h2 code {
31
- color : # 097334 ;
32
- font-size : 16 pt ;
35
+ @media ( min-width : 1200 px ) {
36
+ body {
37
+ max-width : 1170 px ;
38
+ }
33
39
}
34
40
35
- h3 {
36
- font-size : 14pt ;
37
- color : black;
38
- background-color : # D9E7FF ;
39
- border-radius : 0.4em ;
40
- padding : 0.2em 0.5em ;
41
+ h1 , h2 , h3 , h4 , h5 , h6 {
42
+ color : black;
43
+ font-weight : 500 ;
44
+ line-height : 1.1 ;
41
45
}
42
-
43
- h3 code {
44
- color : # 541800 ;
45
- font-size : 14pt ;
46
- font-style : italic;
46
+ h1 , h2 , h3 {
47
+ margin-top : 20px ;
48
+ margin-bottom : 10px ;
49
+ }
50
+ h4 , h5 , h6 {
51
+ margin-top : 12px ;
52
+ margin-bottom : 10px ;
47
53
}
48
54
55
+ h1 {
56
+ font-size : 36px ;
57
+ padding : .1em .4em ;
58
+ margin : 0.67em 0 ;
59
+ background-color : # E9E9E9 ;
60
+ border-radius : .2em ;
61
+ }
62
+ h1 .title {
63
+ line-height : 1.5em ;
64
+ }
65
+ h2 {
66
+ font-size : 30px ;
67
+ padding : .2em .5em ;
68
+ background-color : # E9E9E9 ;
69
+ border-radius : .3em ;
70
+ }
71
+ h3 {
72
+ font-size : 24px ;
73
+ padding : .2em .5em ;
74
+ background-color : # DDE8FC ;
75
+ border-radius : .4em ;
76
+ }
49
77
h4 {
50
- font-size : 11pt ;
51
- margin-top : 0em ;
52
- margin-bottom : 0em ;
78
+ font-size : 18px ;
53
79
}
54
-
55
- code {
56
- font-size : 11pt ;
80
+ h5 {
81
+ font-size : 16px ;
57
82
}
58
-
59
- pre {
60
- margin-left : 1.1em ;
61
- padding : .4em .4em .4em .8em ;
62
- font-size : 10pt ;
63
- background-color : # F5F5F5 ;
64
- border-radius : 0.5em ;
65
- border : 1px solid rgba (0 , 0 , 0 , 0.15 );
83
+ h6 {
84
+ font-size : 14px ;
66
85
}
67
86
68
- pre . rust {
69
- background-color : # F3F6FF ;
87
+ p {
88
+ margin : 0 0 10 px ;
70
89
}
71
90
72
- a , a : visited , a : link {
73
- text-decoration : none;
74
- color : rgb (0 , 105 , 214 );
91
+ /* Links layout
92
+ ========================================================================== */
93
+ a {
94
+ text-decoration : none;
95
+ color : # 428BCA ;
96
+ }
97
+ a : hover , a : focus {
98
+ color : # 2A6496 ;
99
+ text-decoration : underline;
100
+ }
101
+ a : focus {
102
+ outline : thin dotted # 333 ;
103
+ outline : 5px auto -webkit-focus-ring-color;
104
+ outline-offset : -2px ;
105
+ }
106
+ a : hover , a : active {
107
+ outline : 0 ;
75
108
}
76
109
77
110
h1 a : link , h1 a : visited , h2 a : link , h2 a : visited ,
78
- h3 a : link , h3 a : visited { color : black; }
111
+ h3 a : link , h3 a : visited , h4 a : link , h4 a : visited ,
112
+ h5 a : link , h5 a : visited {color : black;}
113
+
114
+ /* Code
115
+ ========================================================================== */
116
+ pre , code {
117
+ font-family : Monaco, Menlo, Consolas, "Courier New" , monospace;
118
+ border-radius : 4px ;
119
+ }
120
+ pre {
121
+ background-color : # F5F5F5 ;
122
+ border : 1px solid # CCC ;
123
+ border-radius : 0.5em ;
124
+ white-space : pre-wrap;
125
+ padding : 9.5px ;
126
+ margin : 10px 0 ;
127
+ font-size : 13px ;
128
+ word-break : break-all;
129
+ word-wrap : break-word;
130
+ }
131
+ code {
132
+ padding : 2px 4px ;
133
+ font-size : 90% ;
134
+ color : # C7254E ;
135
+ background-color : # F9F2F4 ;
136
+ white-space : nowrap;
137
+ }
138
+ pre code {
139
+ padding : 0 ;
140
+ font-size : inherit;
141
+ color : inherit;
142
+ white-space : pre-wrap;
143
+ background-color : transparent;
144
+ border : 0 ;
145
+ }
79
146
80
147
/* Code highlighting */
81
148
.cm-s-default span .cm-keyword {color : # 708 ;}
@@ -98,63 +165,147 @@ h3 a:link, h3 a:visited { color: black; }
98
165
.cm-s-default span .cm-tag {color : # 170 ;}
99
166
.cm-s-default span .cm-attribute {color : # 00c ;}
100
167
168
+ /* The rest
169
+ ========================================================================== */
101
170
# versioninfo {
102
- position : fixed;
103
- bottom : 0px ;
104
- right : 0px ;
105
- text-align : center;
106
- background-color : white;
107
- padding : 0.5em ;
171
+ text-align : center;
172
+ margin : 0.5em ;
173
+ font-size : 1.1em ;
174
+ }
175
+ @media (min-width : 768px ) {
176
+ # versioninfo {
177
+ position : fixed;
178
+ bottom : 0px ;
179
+ right : 0px ;
180
+ }
181
+ .white-sticker {
182
+ background-color : # fff ;
183
+ margin : 2px ;
184
+ padding : 0 2px ;
185
+ border-radius : .3em ;
186
+ }
108
187
}
109
188
# versioninfo a .hash {
110
- color : gray;
111
- font-size : 60% ;
189
+ color : gray;
190
+ font-size : 60% ;
112
191
}
113
- # versioninfo .white-sticker {
114
- + background-color : # fff ;
115
- + margin : 2px;
116
- + padding : 0 2px;
117
- + border-radius : .3em;
118
- + }
119
192
120
193
blockquote {
121
- color : black;
122
- border-left : solid 1px silver;
123
- margin : 1em ;
124
- padding : 0.5em 1em 0.5em 1em ;
194
+ color : black;
195
+ border-left : 5px solid # eee ;
196
+ margin : 0 0 20px ;
197
+ padding : 10px 20px ;
198
+ }
199
+ blockquote p {
200
+ font-size : 17px ;
201
+ font-weight : 300 ;
202
+ line-height : 1.25 ;
203
+ }
204
+ blockquote p : last-child {
205
+ margin-bottom : 0 ;
206
+ }
207
+ blockquote small {
208
+ display : block;
209
+ line-height : 1.428571429 ;
210
+ color : # 999 ;
125
211
}
126
212
127
213
/* Make the table under the tutorial's 'Types' section look nicer */
128
214
table {
129
- border-top : 1px solid silver;
130
- border-bottom : 1px solid silver;
131
- padding : 0.8em ;
132
- font-size : smaller;
215
+ border-top : 1px solid silver;
216
+ border-bottom : 1px solid silver;
217
+ padding : 0.8em ;
218
+ font-size : smaller;
133
219
}
134
220
/* Also for the benefit of the type table */
135
221
td {
136
- padding-right : 1em ;
222
+ padding-right : 1em ;
137
223
}
138
224
139
- /* Only display one level of hierarchy in the TOC */
140
- # TOC ul ul {
141
- display : none;
225
+ ul ,
226
+ ol {
227
+ margin-top : 0 ;
228
+ margin-bottom : 10px ;
229
+ }
230
+ ul ul ,
231
+ ol ul ,
232
+ ul ol ,
233
+ ol ol {
234
+ margin-bottom : 0 ;
235
+ }
236
+ dl {
237
+ margin-bottom : 20px ;
238
+ }
239
+ dd {
240
+ margin-left : 0 ;
142
241
}
143
242
144
243
# TOC ul {
145
- list-style : none;
146
- padding-left : 0px ;
244
+ list-style-type : none;
245
+ padding-left : 0px ;
246
+ }
247
+ /* Only display one level of hierarchy in the TOC */
248
+ # TOC ul ul {
249
+ display : none;
147
250
}
148
251
149
252
/* Adjust list alignment so rustdoc indexes don't align with blockquotes */
150
253
div .index ul {
151
- padding-left : 1em ;
254
+ padding-left : 1em ;
152
255
}
153
256
154
- ul {
155
- margin-top : 0 em
257
+ div . section . level3 {
258
+ margin-left : 1 em ;
156
259
}
157
260
158
- div .section .level3 {
159
- margin-left : 1.0em ;
261
+ sub ,
262
+ sup {
263
+ font-size : 75% ;
264
+ line-height : 0 ;
265
+ position : relative;
160
266
}
267
+
268
+ hr {
269
+ margin-top : 20px ;
270
+ margin-bottom : 20px ;
271
+ border : 0 ;
272
+ border-top : 1px solid # eeeeee ;
273
+ }
274
+
275
+ @media print {
276
+ * {
277
+ text-shadow : none !important ;
278
+ color : # 000 !important ;
279
+ background : transparent !important ;
280
+ box-shadow : none !important ;
281
+ }
282
+ a , a : visited {
283
+ text-decoration : underline;
284
+ }
285
+ a [href ]: after {
286
+ content : " (" attr (href) ")" ;
287
+ }
288
+ a [href ^= "javascript:" ]: after , a [href ^= "#" ]: after {
289
+ content : "" ;
290
+ }
291
+ pre , blockquote {
292
+ border : 1px solid # 999 ;
293
+ page-break-inside : avoid;
294
+ }
295
+ @page {
296
+ margin : 2cm .5cm ;
297
+ }
298
+ p , h2 , h3 {
299
+ orphans : 3 ;
300
+ widows : 3 ;
301
+ }
302
+ h2 , h3 {
303
+ page-break-after : avoid;
304
+ }
305
+ table {
306
+ border-collapse : collapse !important ;
307
+ }
308
+ table td , table th {
309
+ background-color : # fff !important ;
310
+ }
311
+ }
0 commit comments