Skip to content

Commit

Permalink
Migrate top buttons style to CSS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 19, 2022
1 parent 7c75fe4 commit afab05b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 27 deletions.
6 changes: 6 additions & 0 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,12 @@ h3.variant {
background-color: var(--button-background-color);
border: 1px solid var(--border-color);
border-radius: 2px;
color: var(--settings-button-color);
}

#settings-menu > a:hover, #settings-menu > a:focus,
#help-button > a:hover, #help-button > a:focus {
border-color: var(--settings-button-border-focus);
}

#copy-path {
Expand Down
11 changes: 2 additions & 9 deletions src/librustdoc/html/static/css/themes/ayu.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
--main-background-color: #0f1419;
--main-color: #c5c5c5;
--settings-input-color: #ffb454;
--settings-button-color: #fff;
--settings-button-border-focus: #e0e0e0;
--sidebar-background-color: #14191f;
--sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
--code-block-background-color: #191f26;
Expand Down Expand Up @@ -206,19 +208,10 @@ kbd {
box-shadow: inset 0 -1px 0 #5c6773;
}

#settings-menu > a, #help-button > a {
color: #fff;
}

#settings-menu > a img {
filter: invert(100);
}

#settings-menu > a:hover, #settings-menu > a:focus,
#help-button > a:hover, #help-button > a:focus {
border-color: #e0e0e0;
}

.search-results .result-name span.alias {
color: #c5c5c5;
}
Expand Down
11 changes: 2 additions & 9 deletions src/librustdoc/html/static/css/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
--main-background-color: #353535;
--main-color: #ddd;
--settings-input-color: #2196f3;
--settings-button-color: #000;
--settings-button-border-focus: #ffb900;
--sidebar-background-color: #505050;
--sidebar-background-color-hover: #676767;
--code-block-background-color: #2A2A2A;
Expand Down Expand Up @@ -112,15 +114,6 @@ kbd {
box-shadow: inset 0 -1px 0 #c6cbd1;
}

#settings-menu > a, #help-button > a {
color: #000;
}

#settings-menu > a:hover, #settings-menu > a:focus,
#help-button > a:hover, #help-button > a:focus {
border-color: #ffb900;
}

.search-results .result-name span.alias {
color: #fff;
}
Expand Down
11 changes: 2 additions & 9 deletions src/librustdoc/html/static/css/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
--main-background-color: white;
--main-color: black;
--settings-input-color: #2196f3;
--settings-button-color: #000;
--settings-button-border-focus: #717171;
--sidebar-background-color: #F5F5F5;
--sidebar-background-color-hover: #E0E0E0;
--code-block-background-color: #F5F5F5;
Expand Down Expand Up @@ -104,15 +106,6 @@ kbd {
box-shadow: inset 0 -1px 0 #c6cbd1;
}

#settings-menu > a, #help-button > a {
color: #000;
}

#settings-menu > a:hover, #settings-menu > a:focus,
#help-button > a:hover, #help-button > a:focus {
border-color: #717171;
}

.search-results .result-name span.alias {
color: #000;
}
Expand Down

0 comments on commit afab05b

Please sign in to comment.