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
- background-color : white;
8
- color : black;
9
- line-height : 1.6em ;
10
- min-width : 45em ;
11
- 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 ;
12
24
}
13
-
14
- h1 {
15
- font-size : 24pt ;
16
- margin-top : 1.6em ;
17
- padding-left : 0.4em ;
18
- line-height : 1.6em ;
19
- background-color : # FFF2CE ;
20
- border-radius : 0.2em ;
25
+ @media (min-width : 768px ) {
26
+ body {
27
+ max-width : 750px ;
28
+ }
21
29
}
22
-
23
- h2 {
24
- font-size : 16pt ;
25
- margin-top : 1.6em ;
26
- padding : 0.2em 0.5em ;
27
- background-color : # FFF2CE ;
28
- border-radius : 0.4em ;
30
+ @media (min-width : 992px ) {
31
+ body {
32
+ max-width : 970px ;
33
+ }
29
34
}
30
-
31
- h2 code {
32
- color : # 097334 ;
33
- font-size : 16 pt ;
35
+ @media ( min-width : 1200 px ) {
36
+ body {
37
+ max-width : 1170 px ;
38
+ }
34
39
}
35
40
36
- h3 {
37
- font-size : 14pt ;
38
- color : black;
39
- background-color : # D9E7FF ;
40
- border-radius : 0.4em ;
41
- padding : 0.2em 0.5em ;
41
+ h1 , h2 , h3 , h4 , h5 , h6 {
42
+ color : black;
43
+ font-weight : 500 ;
44
+ line-height : 1.1 ;
42
45
}
43
-
44
- h3 code {
45
- color : # 541800 ;
46
- font-size : 14pt ;
47
- 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 ;
48
53
}
49
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
+ }
50
77
h4 {
51
- font-size : 11pt ;
52
- margin-top : 0em ;
53
- margin-bottom : 0em ;
78
+ font-size : 18px ;
54
79
}
55
-
56
- code {
57
- font-size : 11pt ;
80
+ h5 {
81
+ font-size : 16px ;
58
82
}
59
-
60
- pre {
61
- margin-left : 1.1em ;
62
- padding : .4em .4em .4em .8em ;
63
- font-size : 10pt ;
64
- background-color : # F5F5F5 ;
65
- border-radius : 0.5em ;
66
- border : 1px solid rgba (0 , 0 , 0 , 0.15 );
83
+ h6 {
84
+ font-size : 14px ;
67
85
}
68
86
69
- pre . rust {
70
- background-color : # F3F6FF ;
87
+ p {
88
+ margin : 0 0 10 px ;
71
89
}
72
90
73
- a , a : visited , a : link {
74
- text-decoration : none;
75
- 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 ;
76
108
}
77
109
78
110
h1 a : link , h1 a : visited , h2 a : link , h2 a : visited ,
79
- 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
+ }
80
146
81
147
/* Code highlighting */
82
148
.cm-s-default span .cm-keyword {color : # 708 ;}
@@ -99,62 +165,142 @@ h3 a:link, h3 a:visited { color: black; }
99
165
.cm-s-default span .cm-tag {color : # 170 ;}
100
166
.cm-s-default span .cm-attribute {color : # 00c ;}
101
167
168
+ /* The rest
169
+ ========================================================================== */
102
170
# versioninfo {
103
- position : fixed;
104
- bottom : 0px ;
105
- right : 0px ;
106
- text-align : center;
107
- padding : 0.5em ;
171
+ text-align : center;
172
+ margin : 0.5em ;
173
+ font-size : 1.1em ;
108
174
}
109
- # versioninfo a .hash {
110
- color : gray;
111
- font-size : 60% ;
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
+ }
112
187
}
113
- # versioninfo .white-sticker {
114
- background-color : # fff ;
115
- margin : 2px ;
116
- padding : 0 2px ;
117
- border-radius : .3em ;
188
+ # versioninfo a .hash {
189
+ color : gray;
190
+ font-size : 60% ;
118
191
}
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 ;
125
206
}
126
207
127
208
/* Make the table under the tutorial's 'Types' section look nicer */
128
209
table {
129
- border-top : 1px solid silver;
130
- border-bottom : 1px solid silver;
131
- padding : 0.8em ;
132
- font-size : smaller;
210
+ border-top : 1px solid silver;
211
+ border-bottom : 1px solid silver;
212
+ padding : 0.8em ;
213
+ font-size : smaller;
133
214
}
134
215
/* Also for the benefit of the type table */
135
216
td {
136
- padding-right : 1em ;
217
+ padding-right : 1em ;
137
218
}
138
219
139
- /* Only display one level of hierarchy in the TOC */
140
- # TOC ul ul {
141
- display : none;
220
+ ul ,
221
+ ol {
222
+ margin-top : 0 ;
223
+ margin-bottom : 10px ;
224
+ }
225
+ ul ul ,
226
+ ol ul ,
227
+ ul ol ,
228
+ ol ol {
229
+ margin-bottom : 0 ;
230
+ }
231
+ dl {
232
+ margin-bottom : 20px ;
233
+ }
234
+ dd {
235
+ margin-left : 0 ;
142
236
}
143
237
144
238
# TOC ul {
145
- list-style : none;
146
- padding-left : 0px ;
239
+ list-style-type : none;
240
+ padding-left : 0px ;
241
+ }
242
+ /* Only display one level of hierarchy in the TOC */
243
+ # TOC ul ul {
244
+ display : none;
147
245
}
148
246
149
247
/* Adjust list alignment so rustdoc indexes don't align with blockquotes */
150
248
div .index ul {
151
- padding-left : 1em ;
249
+ padding-left : 1em ;
152
250
}
153
251
154
- ul {
155
- margin-top : 0 em
252
+ div . section . level3 {
253
+ margin-left : 1 em ;
156
254
}
157
255
158
- div .section .level3 {
159
- margin-left : 1.0em ;
256
+ sub ,
257
+ sup {
258
+ font-size : 75% ;
259
+ line-height : 0 ;
260
+ position : relative;
160
261
}
262
+
263
+ hr {
264
+ margin-top : 20px ;
265
+ margin-bottom : 20px ;
266
+ border : 0 ;
267
+ border-top : 1px solid # eeeeee ;
268
+ }
269
+
270
+ @media print {
271
+ * {
272
+ text-shadow : none !important ;
273
+ color : # 000 !important ;
274
+ background : transparent !important ;
275
+ box-shadow : none !important ;
276
+ }
277
+ a , a : visited {
278
+ text-decoration : underline;
279
+ }
280
+ a [href ]: after {
281
+ content : " (" attr (href) ")" ;
282
+ }
283
+ a [href ^= "javascript:" ]: after , a [href ^= "#" ]: after {
284
+ content : "" ;
285
+ }
286
+ pre , blockquote {
287
+ border : 1px solid # 999 ;
288
+ page-break-inside : avoid;
289
+ }
290
+ @page {
291
+ margin : 2cm .5cm ;
292
+ }
293
+ p , h2 , h3 {
294
+ orphans : 3 ;
295
+ widows : 3 ;
296
+ }
297
+ h2 , h3 {
298
+ page-break-after : avoid;
299
+ }
300
+ table {
301
+ border-collapse : collapse !important ;
302
+ }
303
+ table td , table th {
304
+ background-color : # fff !important ;
305
+ }
306
+ }
0 commit comments