Skip to content

Commit 14f2bc0

Browse files
Rollup merge of rust-lang#46444 - GuillaumeGomez:css-cleanup, r=QuietMisdreavus
Move colors to main.css r? @QuietMisdreavus
2 parents 912def3 + dddf183 commit 14f2bc0

File tree

2 files changed

+100
-33
lines changed

2 files changed

+100
-33
lines changed

src/librustdoc/html/static/rustdoc.css

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ nav.sub {
208208
.sidebar .version {
209209
font-size: 15px;
210210
text-align: center;
211-
border-bottom: #DDDDDD 1px solid;
211+
border-bottom: 1px solid;
212212
overflow-wrap: break-word;
213213
word-wrap: break-word; /* deprecated */
214214
word-break: break-word; /* Chrome, non-standard */
@@ -247,8 +247,8 @@ nav.sub {
247247
}
248248

249249
.sidebar-title {
250-
border-top: 1px solid #777;
251-
border-bottom: 1px solid #777;
250+
border-top: 1px solid;
251+
border-bottom: 1px solid;
252252
text-align: center;
253253
font-size: 17px;
254254
margin-bottom: 5px;
@@ -364,7 +364,6 @@ h4 > code, h3 > code, .invisible > code {
364364
}
365365

366366
.invisible {
367-
background: rgba(0, 0, 0, 0);
368367
width: 100%;
369368
display: inline-block;
370369
}
@@ -444,7 +443,6 @@ h4 > code, h3 > code, .invisible > code {
444443
.content .fn .where,
445444
.content .where.fmt-newline {
446445
display: block;
447-
color: #4E4C4C;
448446
font-size: 0.8em;
449447
}
450448

@@ -538,7 +536,6 @@ a {
538536
}
539537

540538
.search-input:focus {
541-
border-color: #66afe9;
542539
border-radius: 2px;
543540
border: 0;
544541
outline: 0;
@@ -560,7 +557,8 @@ a {
560557
.content .search-results td:first-child a { padding-right: 10px; }
561558

562559
tr.result span.primitive::after {
563-
content: ' (primitive type)'; font-style: italic; color: black;
560+
content: ' (primitive type)';
561+
font-style: italic;
564562
}
565563

566564
body.blur > :not(#help) {
@@ -697,7 +695,6 @@ a.test-arrow:hover{
697695
font-weight: 300;
698696
position: absolute;
699697
left: -23px;
700-
color: #999;
701698
top: 0;
702699
}
703700

@@ -904,8 +901,6 @@ span.since {
904901
.tooltip .tooltiptext {
905902
width: 120px;
906903
display: none;
907-
background-color: black;
908-
color: #fff;
909904
text-align: center;
910905
padding: 5px 3px;
911906
border-radius: 6px;
@@ -927,13 +922,10 @@ span.since {
927922
margin-top: -5px;
928923
border-width: 5px;
929924
border-style: solid;
930-
border-color: transparent black transparent transparent;
931925
}
932926

933927
.important-traits .tooltip .tooltiptext {
934-
background-color: white;
935-
color: black;
936-
border: 1px solid #000;
928+
border: 1px solid;
937929
}
938930

939931
pre.rust {
@@ -953,22 +945,21 @@ pre.rust {
953945
float: left;
954946
width: 33.3%;
955947
text-align: center;
956-
border-bottom: 1px solid #ccc;
948+
border-bottom: 1px solid;
957949
font-size: 18px;
958950
cursor: pointer;
959951
}
960952

961953
#titles > div.selected {
962-
border-bottom: 3px solid #0078ee;
954+
border-bottom: 3px solid;
963955
}
964956

965957
#titles > div:hover {
966-
border-bottom: 3px solid #0089ff;
958+
border-bottom: 3px solid;
967959
}
968960

969961
#titles > div > div.count {
970962
display: inline-block;
971-
color: #888;
972963
font-size: 16px;
973964
}
974965

@@ -987,7 +978,6 @@ h4 > .important-traits {
987978
position: fixed;
988979
width: 100vw;
989980
height: 100vh;
990-
background-color: rgba(0,0,0,0.3);
991981
z-index: 10000;
992982
top: 0;
993983
left: 0;
@@ -997,13 +987,12 @@ h4 > .important-traits {
997987
display: block;
998988
max-width: 60%;
999989
min-width: 200px;
1000-
background-color: #eee;
1001990
padding: 8px;
1002991
top: 40%;
1003992
position: absolute;
1004993
left: 50%;
1005994
transform: translate(-50%, -40%);
1006-
border: 1px solid #999;
995+
border: 1px solid;
1007996
border-radius: 4px;
1008997
border-top-right-radius: 0;
1009998
}
@@ -1030,35 +1019,24 @@ h3.important {
10301019
right: -25px;
10311020
top: -1px;
10321021
font-size: 18px;
1033-
background-color: #eee;
10341022
width: 25px;
10351023
padding-right: 2px;
10361024
border-top-right-radius: 5px;
10371025
border-bottom-right-radius: 5px;
10381026
text-align: center;
1039-
border: 1px solid #999;
1027+
border: 1px solid;
10401028
border-right: 0;
10411029
cursor: pointer;
10421030
}
10431031

1044-
.modal-content > .close:hover {
1045-
background-color: #ff1f1f;
1046-
color: white;
1047-
}
1048-
10491032
.modal-content > .whiter {
10501033
height: 25px;
10511034
position: absolute;
10521035
width: 3px;
1053-
background-color: #eee;
10541036
right: -2px;
10551037
top: 0px;
10561038
}
10571039

1058-
.modal-content > .close:hover + .whiter {
1059-
background-color: #ff1f1f;
1060-
}
1061-
10621040
#main > div.important-traits {
10631041
position: absolute;
10641042
left: -24px;

src/librustdoc/html/static/styles/main.css

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.t
3131
background-color: white;
3232
}
3333

34+
.invisible {
35+
background: rgba(0, 0, 0, 0);
36+
}
37+
3438
.docblock code, .docblock-short code {
3539
background-color: #F5F5F5;
3640
}
@@ -56,6 +60,15 @@ pre {
5660
color: #333;
5761
}
5862

63+
.sidebar .version {
64+
border-bottom-color: #DDD;
65+
}
66+
67+
.sidebar-title {
68+
border-top-color: #777;
69+
border-bottom-color: #777;
70+
}
71+
5972
.block a:hover {
6073
background: #F5F5F5;
6174
}
@@ -89,6 +102,12 @@ pre {
89102
background: #FDFFD3;
90103
}
91104

105+
.content .method .where,
106+
.content .fn .where,
107+
.content .where.fmt-newline {
108+
color: #4E4C4C;
109+
}
110+
92111
.content .highlighted {
93112
color: #000 !important;
94113
background-color: #ccc;
@@ -152,12 +171,20 @@ a.test-arrow {
152171
color: #f5f5f5;
153172
}
154173

174+
.collapse-toggle {
175+
color: #999;
176+
}
177+
155178
.search-input {
156179
color: #555;
157180
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
158181
background-color: white;
159182
}
160183

184+
.search-input:focus {
185+
border-color: #66afe9;
186+
}
187+
161188
.stab.unstable { background: #FFF5D6; border-color: #FFC600; }
162189
.stab.deprecated { background: #F3DFFF; border-color: #7F0087; }
163190
.stab.portability { background: #C4ECFF; border-color: #7BA5DB; }
@@ -176,6 +203,10 @@ a.test-arrow {
176203
color: grey;
177204
}
178205

206+
tr.result span.primitive::after {
207+
color: black;
208+
}
209+
179210
.line-numbers :target { background-color: transparent; }
180211

181212
/* Code highlighting */
@@ -241,3 +272,61 @@ pre.ignore:hover, .information:hover + pre.ignore {
241272
.search-failed > a {
242273
color: #0089ff;
243274
}
275+
276+
.tooltip .tooltiptext {
277+
background-color: black;
278+
color: #fff;
279+
}
280+
281+
.tooltip .tooltiptext::after {
282+
border-color: transparent black transparent transparent;
283+
}
284+
285+
.important-traits .tooltip .tooltiptext {
286+
background-color: white;
287+
color: black;
288+
border-color: black;
289+
}
290+
291+
#titles > div {
292+
border-bottom-color: #ccc;
293+
}
294+
295+
#titles > div.selected {
296+
border-bottom-color: #0078ee;
297+
}
298+
299+
#titles > div:hover {
300+
border-bottom-color: #0089ff;
301+
}
302+
303+
#titles > div > div.count {
304+
color: #888;
305+
}
306+
307+
.modal {
308+
background-color: rgba(0,0,0,0.3);
309+
}
310+
311+
.modal-content {
312+
background-color: #eee;
313+
border-color: #999;
314+
}
315+
316+
.modal-content > .close {
317+
background-color: #eee;
318+
border-color: #999;
319+
}
320+
321+
.modal-content > .close:hover {
322+
background-color: #ff1f1f;
323+
color: white;
324+
}
325+
326+
.modal-content > .whiter {
327+
background-color: #eee;
328+
}
329+
330+
.modal-content > .close:hover + .whiter {
331+
background-color: #ff1f1f;
332+
}

0 commit comments

Comments
 (0)