Skip to content

Commit

Permalink
Rollup merge of rust-lang#102736 - GuillaumeGomez:search-input-color,…
Browse files Browse the repository at this point in the history
… r=notriddle

Migrate search input color to CSS variable

Part of rust-lang#98460.

No UI changes.

r? `@notriddle`
  • Loading branch information
matthiaskrgr authored Oct 6, 2022
2 parents 42df0a5 + 694f0a1 commit 48964bd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ so that we can apply CSS-filters to change the arrow color in themes */
font-size: 1rem;
width: 100%;
background-color: var(--button-background-color);
color: var(--search-color);
}
.search-input:focus {
border-color: var(--search-input-focused-border-color);
Expand Down
5 changes: 1 addition & 4 deletions src/librustdoc/html/static/css/themes/ayu.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
--search-result-link-focus-background-color: #3c3c3c;
--stab-background-color: #314559;
--stab-code-color: #e6e1cf;
--search-color: #fff;
}

.slider {
Expand Down Expand Up @@ -149,10 +150,6 @@ details.rustdoc-toggle > summary::before {
filter: invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);
}

.search-input {
color: #fff;
}

.module-item .stab,
.import-item .stab {
color: #000;
Expand Down
5 changes: 1 addition & 4 deletions src/librustdoc/html/static/css/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
--search-result-link-focus-background-color: #616161;
--stab-background-color: #314559;
--stab-code-color: #e6e1cf;
--search-color: #111;
}

.slider {
Expand Down Expand Up @@ -72,10 +73,6 @@ details.rustdoc-toggle > summary::before {
filter: invert(100%);
}

.search-input {
color: #111;
}

#crate-search-div::after {
/* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
filter: invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);
Expand Down
1 change: 1 addition & 0 deletions src/librustdoc/html/static/css/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
--search-result-link-focus-background-color: #ccc;
--stab-background-color: #fff5d6;
--stab-code-color: #000;
--search-color: #000;
}

.slider {
Expand Down

0 comments on commit 48964bd

Please sign in to comment.