Skip to content

Commit af7b8eb

Browse files
authored
Unrolled build for rust-lang#124765
Rollup merge of rust-lang#124765 - GuillaumeGomez:fix-wrong-cog-colotr, r=notriddle [rustdoc] Fix bad color for setting cog in ayu theme Before: ![Screenshot from 2024-05-05 19-29-36](https://github.com/rust-lang/rust/assets/3050060/e1f078e5-7fb3-472d-91e7-b4bde551d411) After: ![image](https://github.com/rust-lang/rust/assets/3050060/0aa115ac-dd69-48e1-b93e-067a39cf25d2) r? ````@notriddle````
2 parents 96f1da8 + e460901 commit af7b8eb

File tree

5 files changed

+37
-1
lines changed

5 files changed

+37
-1
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ nav.sub {
8585
--search-tab-button-not-selected-background: #e6e6e6;
8686
--search-tab-button-selected-border-top-color: #0089ff;
8787
--search-tab-button-selected-background: #fff;
88+
--settings-menu-filter: none;
8889
--stab-background-color: #fff5d6;
8990
--stab-code-color: #000;
9091
--code-highlight-kw-color: #8959a8;

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

+4
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,7 @@ a.tooltip:hover::after {
16251625
,5.1715698,7.5,6 S6.8284302,7.5,6,7.5z" fill="black"/></svg>');
16261626
width: 22px;
16271627
height: 22px;
1628+
filter: var(--settings-menu-filter);
16281629
}
16291630

16301631
#sidebar-button > a:before {
@@ -2419,6 +2420,7 @@ by default.
24192420
--search-tab-button-not-selected-background: #e6e6e6;
24202421
--search-tab-button-selected-border-top-color: #0089ff;
24212422
--search-tab-button-selected-background: #fff;
2423+
--settings-menu-filter: none;
24222424
--stab-background-color: #fff5d6;
24232425
--stab-code-color: #000;
24242426
--code-highlight-kw-color: #8959a8;
@@ -2524,6 +2526,7 @@ by default.
25242526
--search-tab-button-not-selected-background: #252525;
25252527
--search-tab-button-selected-border-top-color: #0089ff;
25262528
--search-tab-button-selected-background: #353535;
2529+
--settings-menu-filter: none;
25272530
--stab-background-color: #314559;
25282531
--stab-code-color: #e6e1cf;
25292532
--code-highlight-kw-color: #ab8ac1;
@@ -2636,6 +2639,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
26362639
--search-tab-button-not-selected-background: transparent !important;
26372640
--search-tab-button-selected-border-top-color: none;
26382641
--search-tab-button-selected-background: #141920 !important;
2642+
--settings-menu-filter: invert(100%);
26392643
--stab-background-color: #314559;
26402644
--stab-code-color: #e6e1cf;
26412645
--code-highlight-kw-color: #ff7733;
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// This test ensures that the icon of the settings button looks as expected on
2+
// all themes.
3+
include: "utils.goml"
4+
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
5+
show-text: true
6+
7+
define-function: (
8+
"check-image",
9+
[theme, filter],
10+
block {
11+
call-function: ("switch-theme", {"theme": |theme|})
12+
assert-css: ("#settings-menu > a::before", {
13+
"filter": |filter|,
14+
"width": "22px",
15+
"height": "22px",
16+
})
17+
}
18+
)
19+
20+
call-function: ("check-image", {
21+
"theme": "ayu",
22+
"filter": "invert(1)",
23+
})
24+
call-function: ("check-image", {
25+
"theme": "dark",
26+
"filter": "none",
27+
})
28+
call-function: ("check-image", {
29+
"theme": "light",
30+
"filter": "none",
31+
})

tests/rustdoc-gui/settings.goml

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// This test ensures that the settings menu display is working as expected and that
22
// the settings page is also rendered as expected.
3-
include: "utils.goml"
43
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
54
show-text: true // needed when we check for colors below.
65
// First, we check that the settings page doesn't exist.

tests/rustdoc-gui/src/theme_css/custom-theme.css

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
--search-tab-button-not-selected-background: #e6e6e6;
5050
--search-tab-button-selected-border-top-color: #0089ff;
5151
--search-tab-button-selected-background: #fff;
52+
--settings-menu-filter: none;
5253
--stab-background-color: #fff5d6;
5354
--stab-code-color: #000;
5455
--code-highlight-kw-color: #8959a8;

0 commit comments

Comments
 (0)