Skip to content

Commit 3ff994d

Browse files
committed
rustdoc: tweak outline color on minus button and dark toggle all
1 parent c4a7df7 commit 3ff994d

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/librustdoc/html/static/css/rustdoc.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,9 +1338,9 @@ a.tooltip:hover::after {
13381338
opacity: 1;
13391339
}
13401340

1341-
#settings-menu > a:hover, #settings-menu > a:focus,
1342-
#help-button > a:hover, #help-button > a:focus,
1343-
button#toggle-all-docs:hover, button#toggle-all-docs:focus {
1341+
#settings-menu > a:hover, #settings-menu > a:focus-visible,
1342+
#help-button > a:hover, #help-button > a:focus-visible,
1343+
button#toggle-all-docs:hover, button#toggle-all-docs:focus-visible {
13441344
border-color: var(--settings-button-border-focus);
13451345
}
13461346

@@ -1532,7 +1532,7 @@ details.toggle[open] > summary::before {
15321532
/* toggle minus */
15331533
background: url('data:image/svg+xml,<svg width="17" height="17" \
15341534
shape-rendering="crispEdges" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg"><path \
1535-
d="M2.5 2.5h12v12h-12v-12.5" stroke="%23999"/><path d="M6 8.5h5"/></svg>') no-repeat top left;
1535+
d="M2.5 2.5h12v12h-12v-12.5"/><path d="M6 8.5h5"/></svg>') no-repeat top left;
15361536
}
15371537

15381538
details.toggle[open] > summary::after {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,11 @@
9999
--scrape-example-code-wrapper-background-start: rgba(53, 53, 53, 1);
100100
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
101101
}
102+
103+
/* Other themes give the toggle-all-docs button the same color as the rest of
104+
the toolbar buttons. Dark theme makes it less bright and noticeable. */
105+
button#toggle-all-docs {
106+
background-color: transparent;
107+
border-color: grey;
108+
color: #ddd;
109+
}

tests/rustdoc-gui/anchors.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ call-function: (
103103
"main_heading_type_color": "#2dbfb8",
104104
"src_link_color": "#d2991d",
105105
"sidebar_link_color": "#fdbf35",
106-
"button_color": "#000",
106+
"button_color": "#ddd",
107107
},
108108
)
109109
call-function: (

0 commit comments

Comments
 (0)