Skip to content

Commit ef0540b

Browse files
authored
Rollup merge of rust-lang#74368 - GuillaumeGomez:css-tidy-check, r=Mark-Simulacrum
Add CSS tidy check r? @Mark-Simulacrum
2 parents 344b5e0 + 83ffd5c commit ef0540b

File tree

6 files changed

+123
-70
lines changed

6 files changed

+123
-70
lines changed

src/librustdoc/html/static/normalize.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/librustdoc/html/static/rustdoc.css

+12-11
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
}
5050

5151
* {
52-
-webkit-box-sizing: border-box;
53-
-moz-box-sizing: border-box;
54-
box-sizing: border-box;
52+
-webkit-box-sizing: border-box;
53+
-moz-box-sizing: border-box;
54+
box-sizing: border-box;
5555
}
5656

5757
/* This part handles the "default" theme being used depending on the system one. */
@@ -91,7 +91,8 @@ h2 {
9191
h3 {
9292
font-size: 1.3em;
9393
}
94-
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
94+
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important),
95+
h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
9596
font-weight: 500;
9697
margin: 20px 0 15px 0;
9798
padding-bottom: 6px;
@@ -103,7 +104,8 @@ h1.fqn {
103104
h1.fqn > .in-band > a:hover {
104105
text-decoration: underline;
105106
}
106-
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
107+
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod),
108+
h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
107109
border-bottom: 1px solid;
108110
}
109111
h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant {
@@ -1123,21 +1125,20 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
11231125
/* The margin on the tooltip does not capture hover events,
11241126
this extends the area of hover enough so that mouse hover is not
11251127
lost when moving the mouse to the tooltip */
1126-
content: "\00a0\00a0\00a0";
1128+
content: "\00a0\00a0\00a0";
11271129
}
11281130

11291131
.important-traits .important, .important-traits .docblock {
11301132
margin: 0;
11311133
}
11321134

11331135
.important-traits .docblock code.content{
1134-
margin: 0;
1135-
padding: 0;
1136-
font-size: 20px;
1136+
margin: 0;
1137+
padding: 0;
1138+
font-size: 20px;
11371139
}
11381140

1139-
/* Example code has the "Run" button that
1140-
needs to be positioned relative to the pre */
1141+
/* Example code has the "Run" button that needs to be positioned relative to the pre */
11411142
pre.rust.rust-example-rendered {
11421143
position: relative;
11431144
}

src/librustdoc/html/static/themes/ayu.css

+67-51
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ body {
1010
color: #c5c5c5;
1111
}
1212

13-
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
13+
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod),
14+
h4:not(.method):not(.type):not(.tymethod) {
1415
color: white;
1516
}
1617
h1.fqn {
@@ -41,13 +42,13 @@ h3 > code, h4 > code, h5 > code {
4142
color: #e6e1cf;
4243
}
4344
pre > code {
44-
color: #e6e1cf;
45+
color: #e6e1cf;
4546
}
4647
span code {
47-
color: #e6e1cf;
48+
color: #e6e1cf;
4849
}
4950
.docblock a > code {
50-
color: #39AFD7 !important;
51+
color: #39AFD7 !important;
5152
}
5253
.docblock code, .docblock-short code {
5354
background-color: #191f26;
@@ -100,11 +101,11 @@ pre {
100101
}
101102

102103
.sidebar-elems .location {
103-
color: #ff7733;
104+
color: #ff7733;
104105
}
105106

106107
.sidebar-elems .location a {
107-
color: #fff;
108+
color: #fff;
108109
}
109110

110111
.sidebar .version {
@@ -123,9 +124,9 @@ pre {
123124

124125
.line-numbers span { color: #5c6773ab; }
125126
.line-numbers .line-highlighted {
126-
background-color: rgba(255, 236, 164, 0.06) !important;
127-
padding-right: 4px;
128-
border-right: 1px solid #ffb44c;
127+
background-color: rgba(255, 236, 164, 0.06) !important;
128+
padding-right: 4px;
129+
border-right: 1px solid #ffb44c;
129130
}
130131

131132
.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
@@ -168,31 +169,31 @@ pre {
168169
.content span.keyword, .content a.keyword { color: #de5249; }
169170

170171
.content span.externcrate, .content span.mod, .content a.mod {
171-
color: #acccf9;
172+
color: #acccf9;
172173
}
173174
.content span.struct, .content a.struct {
174-
color: #ffa0a5;
175+
color: #ffa0a5;
175176
}
176177
.content span.enum, .content a.enum {
177-
color: #99e0c9;
178+
color: #99e0c9;
178179
}
179180
.content span.trait, .content a.trait {
180-
color: #39AFD7;
181+
color: #39AFD7;
181182
}
182183
.content span.type, .content a.type {
183-
color: #cfbcf5;
184+
color: #cfbcf5;
184185
}
185186
.content span.fn, .content a.fn, .content span.method,
186187
.content a.method, .content span.tymethod,
187188
.content a.tymethod, .content .fnname {
188-
color: #fdd687;
189+
color: #fdd687;
189190
}
190191
.content span.attr, .content a.attr, .content span.derive,
191192
.content a.derive, .content span.macro, .content a.macro {
192-
color: #a37acc;
193+
color: #a37acc;
193194
}
194195

195-
pre.rust .comment, pre.rust .doccomment {
196+
pre.rust .comment, pre.rust .doccomment {
196197
color: #788797;
197198
font-style: italic;
198199
}
@@ -228,14 +229,24 @@ a {
228229
}
229230

230231
.search-input {
231-
color: #ffffff;
232-
background-color: #141920;
233-
box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent;
234-
transition: box-shadow 150ms ease-in-out;
232+
color: #ffffff;
233+
background-color: #141920;
234+
box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent;
235+
transition: box-shadow 150ms ease-in-out;
235236
}
236237

237238
#crate-search+.search-input:focus {
238-
box-shadow: 0 0 0 1px #148099,0 0 0 2px transparent;
239+
box-shadow: 0 0 0 1px #148099,0 0 0 2px transparent;
240+
color: #ffffff;
241+
background-color: #141920;
242+
box-shadow: none;
243+
transition: box-shadow 150ms ease-in-out;
244+
border-radius: 4px;
245+
margin-left: 8px;
246+
}
247+
248+
#crate-search+.search-input:focus {
249+
box-shadow: 0px 6px 20px 0px black;
239250
}
240251

241252
.search-focus:disabled {
@@ -249,7 +260,7 @@ a {
249260
.stab.unstable,
250261
.stab.deprecated,
251262
.stab.portability {
252-
color: #c5c5c5;
263+
color: #c5c5c5;
253264
background: #314559 !important;
254265
border-style: none !important;
255266
border-radius: 4px;
@@ -262,10 +273,10 @@ a {
262273
}
263274

264275
#help > div {
265-
background: #14191f;
266-
box-shadow: 0px 6px 20px 0px black;
267-
border: none;
268-
border-radius: 4px;
276+
background: #14191f;
277+
box-shadow: 0px 6px 20px 0px black;
278+
border: none;
279+
border-radius: 4px;
269280
}
270281

271282
.since {
@@ -288,14 +299,14 @@ pre.rust .question-mark {
288299
color: #ff9011;
289300
}
290301
pre.rust .self {
291-
color: #36a3d9;
292-
font-style: italic;
302+
color: #36a3d9;
303+
font-style: italic;
293304
}
294305
pre.rust .attribute {
295-
color: #e6e1cf;
306+
color: #e6e1cf;
296307
}
297308
pre.rust .attribute .ident, pre.rust .attribute .op {
298-
color: #e6e1cf;
309+
color: #e6e1cf;
299310
}
300311

301312
.example-wrap > pre.line-number {
@@ -304,15 +315,15 @@ pre.rust .attribute .ident, pre.rust .attribute .op {
304315
}
305316

306317
a.test-arrow {
307-
font-size: 100%;
308-
color: #788797;
309-
border-radius: 4px;
310-
background-color: rgba(255, 255, 255, 0);
318+
font-size: 100%;
319+
color: #788797;
320+
border-radius: 4px;
321+
background-color: rgba(255, 255, 255, 0);
311322
}
312323

313324
a.test-arrow:hover {
314-
background-color: rgba(242, 151, 24, 0.05);
315-
color: #ffb44c;
325+
background-color: rgba(242, 151, 24, 0.05);
326+
color: #ffb44c;
316327
}
317328

318329
.toggle-label {
@@ -377,22 +388,22 @@ pre.ignore:hover, .information:hover + pre.ignore {
377388
}
378389

379390
.tooltip .tooltiptext {
380-
background-color: #314559;
381-
color: #c5c5c5;
382-
border: 1px solid #5c6773;
391+
background-color: #314559;
392+
color: #c5c5c5;
393+
border: 1px solid #5c6773;
383394
}
384395

385396
.tooltip .tooltiptext::after {
386397
border-color: transparent #314559 transparent transparent;
387398
}
388399

389400
.important-traits-tooltiptext {
390-
background-color: #314559;
391-
border-color: #5c6773;
401+
background-color: #314559;
402+
border-color: #5c6773;
392403
}
393404

394405
#titles > div.selected {
395-
background-color: #141920 !important;
406+
background-color: #141920 !important;
396407
border-bottom: 1px solid #ffb44c !important;
397408
border-top: none;
398409
}
@@ -403,7 +414,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
403414
}
404415

405416
#titles > div:hover {
406-
border-bottom: 1px solid rgba(242, 151, 24, 0.3);
417+
border-bottom: 1px solid rgba(242, 151, 24, 0.3);
407418
}
408419

409420
#titles > div > div.count {
@@ -413,12 +424,13 @@ pre.ignore:hover, .information:hover + pre.ignore {
413424
/* rules that this theme does not need to set, here to satisfy the rule checker */
414425
/* note that a lot of these are partially set in some way (meaning they are set
415426
individually rather than as a group) */
416-
/* TODO: these rules should be at the bottom of the file but currently must be
427+
/* FIXME: these rules should be at the bottom of the file but currently must be
417428
above the `@media (max-width: 700px)` rules due to a bug in the css checker */
418429
/* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
419430
.content .highlighted.mod, .content .highlighted.externcrate {}
420431
.search-input:focus {}
421-
.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro {}
432+
.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,
433+
.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro {}
422434
.content .highlighted.trait {}
423435
.content span.struct,.content a.struct,.block a.current.struct {}
424436
#titles>div:hover,#titles>div.selected {}
@@ -433,16 +445,20 @@ pre.rust .lifetime {}
433445
.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod {}
434446
h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod) {}
435447
.content span.enum,.content a.enum,.block a.current.enum {}
436-
.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static {}
448+
.content span.constant,.content a.constant,.block a.current.constant,.content span.static,
449+
.content a.static,.block a.current.static {}
437450
.content span.keyword,.content a.keyword,.block a.current.keyword {}
438451
pre.rust .comment {}
439452
.content .highlighted.enum {}
440453
.content .highlighted.struct {}
441454
.content .highlighted.keyword {}
442455
.content span.traitalias,.content a.traitalias,.block a.current.traitalias {}
443-
.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname {}
456+
.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,
457+
.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,
458+
.content .fnname {}
444459
pre.rust .kw {}
445-
pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident {}
460+
pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,
461+
pre.rust .attribute .ident {}
446462
.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype {}
447463
pre.rust .doccomment {}
448464
.stab.deprecated {}
@@ -483,11 +499,11 @@ kbd {
483499

484500
#theme-picker, #settings-menu {
485501
border-color: #5c6773;
486-
background-color: #0f1419;
502+
background-color: #0f1419;
487503
}
488504

489505
#theme-picker > img, #settings-menu > img {
490-
filter: invert(100);
506+
filter: invert(100);
491507
}
492508

493509
#theme-picker:hover, #theme-picker:focus,

src/librustdoc/html/static/themes/dark.css

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ body {
33
color: #ddd;
44
}
55

6-
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
6+
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod),
7+
h4:not(.method):not(.type):not(.tymethod) {
78
color: #ddd;
89
}
910
h1.fqn {
1011
border-bottom-color: #d2d2d2;
1112
}
12-
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
13+
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod),
14+
h4:not(.method):not(.type):not(.tymethod) {
1315
border-bottom-color: #d2d2d2;
1416
}
1517

src/librustdoc/html/static/themes/light.css

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ body {
55
color: black;
66
}
77

8-
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
8+
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod),
9+
h4:not(.method):not(.type):not(.tymethod) {
910
color: black;
1011
}
1112
h1.fqn {
1213
border-bottom-color: #D5D5D5;
1314
}
14-
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
15+
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod),
16+
h4:not(.method):not(.type):not(.tymethod) {
1517
border-bottom-color: #DDDDDD;
1618
}
1719

0 commit comments

Comments
 (0)