Skip to content

Commit f69f4cb

Browse files
authored
Rollup merge of rust-lang#104604 - GuillaumeGomez:migrate-top-button-to-css-var, r=notriddle
Migrate top buttons style to CSS variables No UI changes. r? `@notriddle`
2 parents c571b2a + afab05b commit f69f4cb

File tree

4 files changed

+12
-27
lines changed

4 files changed

+12
-27
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,12 @@ a.test-arrow:hover {
13781378
background-color: var(--button-background-color);
13791379
border: 1px solid var(--border-color);
13801380
border-radius: 2px;
1381+
color: var(--settings-button-color);
1382+
}
1383+
1384+
#settings-menu > a:hover, #settings-menu > a:focus,
1385+
#help-button > a:hover, #help-button > a:focus {
1386+
border-color: var(--settings-button-border-focus);
13811387
}
13821388

13831389
#copy-path {

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

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
77
--main-background-color: #0f1419;
88
--main-color: #c5c5c5;
99
--settings-input-color: #ffb454;
10+
--settings-button-color: #fff;
11+
--settings-button-border-focus: #e0e0e0;
1012
--sidebar-background-color: #14191f;
1113
--sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
1214
--code-block-background-color: #191f26;
@@ -199,19 +201,10 @@ kbd {
199201
box-shadow: inset 0 -1px 0 #5c6773;
200202
}
201203

202-
#settings-menu > a, #help-button > a {
203-
color: #fff;
204-
}
205-
206204
#settings-menu > a img {
207205
filter: invert(100);
208206
}
209207

210-
#settings-menu > a:hover, #settings-menu > a:focus,
211-
#help-button > a:hover, #help-button > a:focus {
212-
border-color: #e0e0e0;
213-
}
214-
215208
.search-results .result-name span.alias {
216209
color: #c5c5c5;
217210
}

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

+2-9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
--main-background-color: #353535;
33
--main-color: #ddd;
44
--settings-input-color: #2196f3;
5+
--settings-button-color: #000;
6+
--settings-button-border-focus: #ffb900;
57
--sidebar-background-color: #505050;
68
--sidebar-background-color-hover: #676767;
79
--code-block-background-color: #2A2A2A;
@@ -104,15 +106,6 @@ kbd {
104106
box-shadow: inset 0 -1px 0 #c6cbd1;
105107
}
106108

107-
#settings-menu > a, #help-button > a {
108-
color: #000;
109-
}
110-
111-
#settings-menu > a:hover, #settings-menu > a:focus,
112-
#help-button > a:hover, #help-button > a:focus {
113-
border-color: #ffb900;
114-
}
115-
116109
.search-results .result-name span.alias {
117110
color: #fff;
118111
}

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

+2-9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
--main-background-color: white;
33
--main-color: black;
44
--settings-input-color: #2196f3;
5+
--settings-button-color: #000;
6+
--settings-button-border-focus: #717171;
57
--sidebar-background-color: #F5F5F5;
68
--sidebar-background-color-hover: #E0E0E0;
79
--code-block-background-color: #F5F5F5;
@@ -97,15 +99,6 @@ kbd {
9799
box-shadow: inset 0 -1px 0 #c6cbd1;
98100
}
99101

100-
#settings-menu > a, #help-button > a {
101-
color: #000;
102-
}
103-
104-
#settings-menu > a:hover, #settings-menu > a:focus,
105-
#help-button > a:hover, #help-button > a:focus {
106-
border-color: #717171;
107-
}
108-
109102
.search-results .result-name span.alias {
110103
color: #000;
111104
}

0 commit comments

Comments
 (0)