Skip to content

Commit dddf183

Browse files
Move colors to main.css
1 parent 8bcbf91 commit dddf183

File tree

2 files changed

+100
-33
lines changed

2 files changed

+100
-33
lines changed

src/librustdoc/html/static/rustdoc.css

+11-33
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;
@@ -354,7 +354,6 @@ h4 > code, h3 > code, .invisible > code {
354354
}
355355

356356
.invisible {
357-
background: rgba(0, 0, 0, 0);
358357
width: 100%;
359358
display: inline-block;
360359
}
@@ -434,7 +433,6 @@ h4 > code, h3 > code, .invisible > code {
434433
.content .fn .where,
435434
.content .where.fmt-newline {
436435
display: block;
437-
color: #4E4C4C;
438436
font-size: 0.8em;
439437
}
440438

@@ -528,7 +526,6 @@ a {
528526
}
529527

530528
.search-input:focus {
531-
border-color: #66afe9;
532529
border-radius: 2px;
533530
border: 0;
534531
outline: 0;
@@ -550,7 +547,8 @@ a {
550547
.content .search-results td:first-child a { padding-right: 10px; }
551548

552549
tr.result span.primitive::after {
553-
content: ' (primitive type)'; font-style: italic; color: black;
550+
content: ' (primitive type)';
551+
font-style: italic;
554552
}
555553

556554
body.blur > :not(#help) {
@@ -687,7 +685,6 @@ a.test-arrow:hover{
687685
font-weight: 300;
688686
position: absolute;
689687
left: -23px;
690-
color: #999;
691688
top: 0;
692689
}
693690

@@ -894,8 +891,6 @@ span.since {
894891
.tooltip .tooltiptext {
895892
width: 120px;
896893
display: none;
897-
background-color: black;
898-
color: #fff;
899894
text-align: center;
900895
padding: 5px 3px;
901896
border-radius: 6px;
@@ -917,13 +912,10 @@ span.since {
917912
margin-top: -5px;
918913
border-width: 5px;
919914
border-style: solid;
920-
border-color: transparent black transparent transparent;
921915
}
922916

923917
.important-traits .tooltip .tooltiptext {
924-
background-color: white;
925-
color: black;
926-
border: 1px solid #000;
918+
border: 1px solid;
927919
}
928920

929921
pre.rust {
@@ -943,22 +935,21 @@ pre.rust {
943935
float: left;
944936
width: 33.3%;
945937
text-align: center;
946-
border-bottom: 1px solid #ccc;
938+
border-bottom: 1px solid;
947939
font-size: 18px;
948940
cursor: pointer;
949941
}
950942

951943
#titles > div.selected {
952-
border-bottom: 3px solid #0078ee;
944+
border-bottom: 3px solid;
953945
}
954946

955947
#titles > div:hover {
956-
border-bottom: 3px solid #0089ff;
948+
border-bottom: 3px solid;
957949
}
958950

959951
#titles > div > div.count {
960952
display: inline-block;
961-
color: #888;
962953
font-size: 16px;
963954
}
964955

@@ -977,7 +968,6 @@ h4 > .important-traits {
977968
position: fixed;
978969
width: 100vw;
979970
height: 100vh;
980-
background-color: rgba(0,0,0,0.3);
981971
z-index: 10000;
982972
top: 0;
983973
left: 0;
@@ -987,13 +977,12 @@ h4 > .important-traits {
987977
display: block;
988978
max-width: 60%;
989979
min-width: 200px;
990-
background-color: #eee;
991980
padding: 8px;
992981
top: 40%;
993982
position: absolute;
994983
left: 50%;
995984
transform: translate(-50%, -40%);
996-
border: 1px solid #999;
985+
border: 1px solid;
997986
border-radius: 4px;
998987
border-top-right-radius: 0;
999988
}
@@ -1020,35 +1009,24 @@ h3.important {
10201009
right: -25px;
10211010
top: -1px;
10221011
font-size: 18px;
1023-
background-color: #eee;
10241012
width: 25px;
10251013
padding-right: 2px;
10261014
border-top-right-radius: 5px;
10271015
border-bottom-right-radius: 5px;
10281016
text-align: center;
1029-
border: 1px solid #999;
1017+
border: 1px solid;
10301018
border-right: 0;
10311019
cursor: pointer;
10321020
}
10331021

1034-
.modal-content > .close:hover {
1035-
background-color: #ff1f1f;
1036-
color: white;
1037-
}
1038-
10391022
.modal-content > .whiter {
10401023
height: 25px;
10411024
position: absolute;
10421025
width: 3px;
1043-
background-color: #eee;
10441026
right: -2px;
10451027
top: 0px;
10461028
}
10471029

1048-
.modal-content > .close:hover + .whiter {
1049-
background-color: #ff1f1f;
1050-
}
1051-
10521030
#main > div.important-traits {
10531031
position: absolute;
10541032
left: -24px;

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

+89
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)