Skip to content

Commit 4cef849

Browse files
committed
rustdoc: tweak outline color on minus button and dark toggle all
1 parent 93ca4f0 commit 4cef849

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
@@ -1422,9 +1422,9 @@ a.tooltip:hover::after {
14221422
opacity: 1;
14231423
}
14241424

1425-
#settings-menu > a:hover, #settings-menu > a:focus,
1426-
#help-button > a:hover, #help-button > a:focus,
1427-
button#toggle-all-docs:hover, button#toggle-all-docs:focus {
1425+
#settings-menu > a:hover, #settings-menu > a:focus-visible,
1426+
#help-button > a:hover, #help-button > a:focus-visible,
1427+
button#toggle-all-docs:hover, button#toggle-all-docs:focus-visible {
14281428
border-color: var(--settings-button-border-focus);
14291429
}
14301430

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

16221622
details.toggle[open] > summary::after {
@@ -2318,6 +2318,14 @@ in src-script.js
23182318
--scrape-example-code-wrapper-background-start: rgba(53, 53, 53, 1);
23192319
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
23202320
}
2321+
2322+
/* Other themes give the toggle-all-docs button the same color as the rest of
2323+
the toolbar buttons. Dark theme makes it less bright and noticeable. */
2324+
:root[data-theme="dark"] button#toggle-all-docs {
2325+
background-color: transparent;
2326+
border-color: grey;
2327+
color: #ddd;
2328+
}
23212329
/* End theme: dark */
23222330

23232331
/* 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)