Skip to content

Commit a0748d9

Browse files
committed
tweak all sidebar colours
1 parent 9c3ffd7 commit a0748d9

File tree

4 files changed

+68
-4
lines changed

4 files changed

+68
-4
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ pre, .rustdoc.source .example-wrap {
191191
color: #a37acc;
192192
}
193193

194+
.sidebar a { color: #53b1db; }
195+
.sidebar a.current.type { color: #53b1db; }
196+
.sidebar a.current.associatedtype { color: #53b1db; }
197+
194198
pre.rust .comment { color: #788797; }
195199
pre.rust .doccomment { color: #a1ac88; }
196200

@@ -496,6 +500,25 @@ a.result-static:focus {}
496500
a.result-primitive:focus {}
497501
a.result-keyword:focus {}
498502

503+
.sidebar a.current.enum {}
504+
.sidebar a.current.struct {}
505+
.sidebar a.current.foreigntype {}
506+
.sidebar a.current.attr,
507+
.sidebar a.current.derive,
508+
.sidebar a.current.macro {}
509+
.sidebar a.current.union {}
510+
.sidebar a.current.constant
511+
.sidebar a.current.static {}
512+
.sidebar a.current.primitive {}
513+
.sidebar a.current.externcrate
514+
.sidebar a.current.mod {}
515+
.sidebar a.current.trait {}
516+
.sidebar a.current.traitalias {}
517+
.sidebar a.current.fn,
518+
.sidebar a.current.method,
519+
.sidebar a.current.tymethod {}
520+
.sidebar a.current.keyword {}
521+
499522
@media (max-width: 700px) {
500523
.sidebar-menu {
501524
background-color: #14191f;

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

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,28 @@ a.result-keyword:focus { background-color: #884719; }
148148
.content .fnname{ color: #2BAB63; }
149149
.content span.keyword, .content a.keyword, .block a.current.keyword { color: #D2991D; }
150150

151+
.sidebar a { color: #fdbf35; }
152+
.sidebar a.current.enum { color: #12ece2; }
153+
.sidebar a.current.struct { color: #12ece2; }
154+
.sidebar a.current.type { color: #12ece2; }
155+
.sidebar a.current.associatedtype { color: #fdbf35; }
156+
.sidebar a.current.foreigntype { color: #12ece2; }
157+
.sidebar a.current.attr,
158+
.sidebar a.current.derive,
159+
.sidebar a.current.macro { color: #0be900; }
160+
.sidebar a.current.union { color: #12ece2; }
161+
.sidebar a.current.constant
162+
.sidebar a.current.static { color: #fdbf35; }
163+
.sidebar a.current.primitive { color: #12ece2; }
164+
.sidebar a.current.externcrate
165+
.sidebar a.current.mod { color: #fdbf35; }
166+
.sidebar a.current.trait { color: #cca7ff; }
167+
.sidebar a.current.traitalias { color: #cca7ff; }
168+
.sidebar a.current.fn,
169+
.sidebar a.current.method,
170+
.sidebar a.current.tymethod { color: #32d479; }
171+
.sidebar a.current.keyword { color: #fdbf35; }
172+
151173
pre.rust .comment { color: #8d8d8b; }
152174
pre.rust .doccomment { color: #8ca375; }
153175

@@ -182,9 +204,6 @@ a.test-arrow {
182204
body.source .example-wrap pre.rust a {
183205
background: #333;
184206
}
185-
.sidebar a {
186-
color: #fdbf35;
187-
}
188207

189208
details.rustdoc-toggle > summary.hideme > span,
190209
details.rustdoc-toggle > summary::before,

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,28 @@ a.result-keyword:focus { background-color: #afc6e4; }
148148
.content .fnname { color: #AD7C37; }
149149
.content span.keyword, .content a.keyword, .block a.current.keyword { color: #3873AD; }
150150

151+
.sidebar a { color: #356da4; }
152+
.sidebar a.current.enum { color: #a63283; }
153+
.sidebar a.current.struct { color: #a63283; }
154+
.sidebar a.current.type { color: #a63283; }
155+
.sidebar a.current.associatedtype { color: #356da4; }
156+
.sidebar a.current.foreigntype { color: #356da4; }
157+
.sidebar a.current.attr,
158+
.sidebar a.current.derive,
159+
.sidebar a.current.macro { color: #067901; }
160+
.sidebar a.current.union { color: #a63283; }
161+
.sidebar a.current.constant
162+
.sidebar a.current.static { color: #356da4; }
163+
.sidebar a.current.primitive { color: #a63283; }
164+
.sidebar a.current.externcrate
165+
.sidebar a.current.mod { color: #356da4; }
166+
.sidebar a.current.trait { color: #6849c3; }
167+
.sidebar a.current.traitalias { color: #4b349e; }
168+
.sidebar a.current.fn,
169+
.sidebar a.current.method,
170+
.sidebar a.current.tymethod { color: #32d479; }
171+
.sidebar a.current.keyword { color: #356da4; }
172+
151173
nav.main .current {
152174
border-top-color: #000;
153175
border-bottom-color: #000;

src/test/rustdoc-gui/anchors.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ assert-css: (".srclink", {"text-decoration": "underline solid rgb(56, 115, 173)"
2020

2121
assert-css: ("#top-doc-prose-title", {"color": "rgb(0, 0, 0)"})
2222

23-
assert-css: (".sidebar a", {"color": "rgb(56, 115, 173)"})
23+
assert-css: (".sidebar a", {"color": "rgb(53, 109, 164)"})
2424
assert-css: (".in-band a", {"color": "rgb(0, 0, 0)"})
2525

2626
// We move the cursor over the "Implementations" title so the anchor is displayed.

0 commit comments

Comments
 (0)