Skip to content

Commit afab05b

Browse files
Migrate top buttons style to CSS variables
1 parent 7c75fe4 commit afab05b

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
@@ -1393,6 +1393,12 @@ h3.variant {
13931393
background-color: var(--button-background-color);
13941394
border: 1px solid var(--border-color);
13951395
border-radius: 2px;
1396+
color: var(--settings-button-color);
1397+
}
1398+
1399+
#settings-menu > a:hover, #settings-menu > a:focus,
1400+
#help-button > a:hover, #help-button > a:focus {
1401+
border-color: var(--settings-button-border-focus);
13961402
}
13971403

13981404
#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;
@@ -206,19 +208,10 @@ kbd {
206208
box-shadow: inset 0 -1px 0 #5c6773;
207209
}
208210

209-
#settings-menu > a, #help-button > a {
210-
color: #fff;
211-
}
212-
213211
#settings-menu > a img {
214212
filter: invert(100);
215213
}
216214

217-
#settings-menu > a:hover, #settings-menu > a:focus,
218-
#help-button > a:hover, #help-button > a:focus {
219-
border-color: #e0e0e0;
220-
}
221-
222215
.search-results .result-name span.alias {
223216
color: #c5c5c5;
224217
}

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;
@@ -112,15 +114,6 @@ kbd {
112114
box-shadow: inset 0 -1px 0 #c6cbd1;
113115
}
114116

115-
#settings-menu > a, #help-button > a {
116-
color: #000;
117-
}
118-
119-
#settings-menu > a:hover, #settings-menu > a:focus,
120-
#help-button > a:hover, #help-button > a:focus {
121-
border-color: #ffb900;
122-
}
123-
124117
.search-results .result-name span.alias {
125118
color: #fff;
126119
}

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;
@@ -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: #717171;
114-
}
115-
116109
.search-results .result-name span.alias {
117110
color: #000;
118111
}

0 commit comments

Comments
 (0)