Skip to content

Commit a6800e3

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 2497434 + 63ffa13 commit a6800e3

File tree

6 files changed

+108
-64
lines changed

6 files changed

+108
-64
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

+7-5
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 {

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

+57-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
}
@@ -229,16 +230,16 @@ a {
229230
}
230231

231232
.search-input {
232-
color: #ffffff;
233-
background-color: #141920;
234-
box-shadow: none;
235-
transition: box-shadow 150ms ease-in-out;
236-
border-radius: 4px;
237-
margin-left: 8px;
233+
color: #ffffff;
234+
background-color: #141920;
235+
box-shadow: none;
236+
transition: box-shadow 150ms ease-in-out;
237+
border-radius: 4px;
238+
margin-left: 8px;
238239
}
239240

240241
#crate-search+.search-input:focus {
241-
box-shadow: 0px 6px 20px 0px black;
242+
box-shadow: 0px 6px 20px 0px black;
242243
}
243244

244245
.search-focus:disabled {
@@ -252,7 +253,7 @@ a {
252253
.stab.unstable,
253254
.stab.deprecated,
254255
.stab.portability {
255-
color: #c5c5c5;
256+
color: #c5c5c5;
256257
background: #314559 !important;
257258
border-style: none !important;
258259
border-radius: 4px;
@@ -265,10 +266,10 @@ a {
265266
}
266267

267268
#help > div {
268-
background: #14191f;
269-
box-shadow: 0px 6px 20px 0px black;
270-
border: none;
271-
border-radius: 4px;
269+
background: #14191f;
270+
box-shadow: 0px 6px 20px 0px black;
271+
border: none;
272+
border-radius: 4px;
272273
}
273274

274275
.since {
@@ -291,14 +292,14 @@ pre.rust .question-mark {
291292
color: #ff9011;
292293
}
293294
pre.rust .self {
294-
color: #36a3d9;
295-
font-style: italic;
295+
color: #36a3d9;
296+
font-style: italic;
296297
}
297298
pre.rust .attribute {
298-
color: #e6e1cf;
299+
color: #e6e1cf;
299300
}
300301
pre.rust .attribute .ident, pre.rust .attribute .op {
301-
color: #e6e1cf;
302+
color: #e6e1cf;
302303
}
303304

304305
.example-wrap > pre.line-number {
@@ -307,15 +308,15 @@ pre.rust .attribute .ident, pre.rust .attribute .op {
307308
}
308309

309310
a.test-arrow {
310-
font-size: 100%;
311-
color: #788797;
312-
border-radius: 4px;
313-
background-color: rgba(255, 255, 255, 0);
311+
font-size: 100%;
312+
color: #788797;
313+
border-radius: 4px;
314+
background-color: rgba(255, 255, 255, 0);
314315
}
315316

316317
a.test-arrow:hover {
317-
background-color: rgba(242, 151, 24, 0.05);
318-
color: #ffb44c;
318+
background-color: rgba(242, 151, 24, 0.05);
319+
color: #ffb44c;
319320
}
320321

321322
.toggle-label {
@@ -380,9 +381,9 @@ pre.ignore:hover, .information:hover + pre.ignore {
380381
}
381382

382383
.tooltip .tooltiptext {
383-
background-color: #314559;
384-
color: #c5c5c5;
385-
border: 1px solid #5c6773;
384+
background-color: #314559;
385+
color: #c5c5c5;
386+
border: 1px solid #5c6773;
386387
}
387388

388389
.tooltip .tooltiptext::after {
@@ -395,7 +396,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
395396
}
396397

397398
#titles > div.selected {
398-
background-color: #141920 !important;
399+
background-color: #141920 !important;
399400
border-bottom: 1px solid #ffb44c !important;
400401
border-top: none;
401402
}
@@ -406,7 +407,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
406407
}
407408

408409
#titles > div:hover {
409-
border-bottom: 1px solid rgba(242, 151, 24, 0.3);
410+
border-bottom: 1px solid rgba(242, 151, 24, 0.3);
410411
}
411412

412413
#titles > div > div.count {
@@ -416,12 +417,13 @@ pre.ignore:hover, .information:hover + pre.ignore {
416417
/* rules that this theme does not need to set, here to satisfy the rule checker */
417418
/* note that a lot of these are partially set in some way (meaning they are set
418419
individually rather than as a group) */
419-
/* TODO: these rules should be at the bottom of the file but currently must be
420+
/* FIXME: these rules should be at the bottom of the file but currently must be
420421
above the `@media (max-width: 700px)` rules due to a bug in the css checker */
421422
/* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
422423
.content .highlighted.mod, .content .highlighted.externcrate {}
423424
.search-input:focus {}
424-
.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 {}
425+
.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,
426+
.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro {}
425427
.content .highlighted.trait {}
426428
.content span.struct,.content a.struct,.block a.current.struct {}
427429
#titles>div:hover,#titles>div.selected {}
@@ -436,16 +438,20 @@ pre.rust .lifetime {}
436438
.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod {}
437439
h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod) {}
438440
.content span.enum,.content a.enum,.block a.current.enum {}
439-
.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static {}
441+
.content span.constant,.content a.constant,.block a.current.constant,.content span.static,
442+
.content a.static,.block a.current.static {}
440443
.content span.keyword,.content a.keyword,.block a.current.keyword {}
441444
pre.rust .comment {}
442445
.content .highlighted.enum {}
443446
.content .highlighted.struct {}
444447
.content .highlighted.keyword {}
445448
.content span.traitalias,.content a.traitalias,.block a.current.traitalias {}
446-
.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 {}
449+
.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,
450+
.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,
451+
.content .fnname {}
447452
pre.rust .kw {}
448-
pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident {}
453+
pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,
454+
pre.rust .attribute .ident {}
449455
.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype {}
450456
pre.rust .doccomment {}
451457
.stab.deprecated {}
@@ -486,11 +492,11 @@ kbd {
486492

487493
#theme-picker, #settings-menu {
488494
border-color: #5c6773;
489-
background-color: #0f1419;
495+
background-color: #0f1419;
490496
}
491497

492498
#theme-picker > img, #settings-menu > img {
493-
filter: invert(100);
499+
filter: invert(100);
494500
}
495501

496502
#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)