Skip to content

Commit 73d8119

Browse files
committed
rustdoc: tweak outline color on minus button and dark toggle all
1 parent 6930b14 commit 73d8119

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

src/librustdoc/html/static/css/noscript.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,13 @@ nav.sub {
239239
--scrape-example-code-wrapper-background-start: rgba(53, 53, 53, 1);
240240
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
241241
}
242+
243+
/* Other themes give the toggle-all-docs button the same color as the rest of
244+
the toolbar buttons. Dark theme makes it less bright and noticeable. */
245+
:root button#toggle-all-docs {
246+
background-color: transparent;
247+
border-color: grey;
248+
color: #ddd;
249+
}
242250
/* End theme: dark */
243251
}

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,9 +1483,9 @@ a.tooltip:hover::after {
14831483
opacity: 1;
14841484
}
14851485

1486-
#settings-menu > a:hover, #settings-menu > a:focus,
1487-
#help-button > a:hover, #help-button > a:focus,
1488-
button#toggle-all-docs:hover, button#toggle-all-docs:focus {
1486+
#settings-menu > a:hover, #settings-menu > a:focus-visible,
1487+
#help-button > a:hover, #help-button > a:focus-visible,
1488+
button#toggle-all-docs:hover, button#toggle-all-docs:focus-visible {
14891489
border-color: var(--settings-button-border-focus);
14901490
}
14911491

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

16831683
details.toggle[open] > summary::after {
@@ -2382,6 +2382,14 @@ in src-script.js
23822382
--scrape-example-code-wrapper-background-start: rgba(53, 53, 53, 1);
23832383
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
23842384
}
2385+
2386+
/* Other themes give the toggle-all-docs button the same color as the rest of
2387+
the toolbar buttons. Dark theme makes it less bright and noticeable. */
2388+
:root[data-theme="dark"] button#toggle-all-docs {
2389+
background-color: transparent;
2390+
border-color: grey;
2391+
color: #ddd;
2392+
}
23852393
/* End theme: dark */
23862394

23872395
/* Begin theme: ayu */

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)