Skip to content

Commit

Permalink
Improve contrast of the search placeholder text (JuliaDocs#2235)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi authored Aug 28, 2023
1 parent 2c08ddd commit 8a9f45d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
4 changes: 1 addition & 3 deletions assets/html/scss/documenter-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ $documenter-docstring-shadow: none;
$input-color: $grey-lighter;
$input-background-color: $body-background-color;
$input-border-color: $border;
$input-placeholder-color: rgba($input-color, 0.3);
$input-placeholder-color: #868c98;

$search-result-link-text-color: #333;
$search-result-link-text-background-color: #f1f5f9;
Expand All @@ -79,8 +79,6 @@ $button-static-color: $grey-lighter;
$button-static-background-color: $background;
$button-static-border-color: $border;

$documenter-search-query-text-color: rgba(219, 222, 224, 0.3);

// All secondary themes have to be nested in a theme--$(themename) class. When Documenter
// switches themes, it applies this class to <html> and then disables the primary
// stylesheet.
Expand Down
5 changes: 2 additions & 3 deletions assets/html/scss/documenter/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ $documenter-docstring-body-padding: $documenter-docstring-body-padding-v $docume
$search-result-link-hover: rgba(0, 128, 128, 0.1) !default;
$search-result-link-text-color: #f1f5f9 !default;
$search-result-link-text-background-color: #333 !default;
$search-result-title-text-color: #333 !default;
$search-result-title-text-color: #333 !default;
$search-result-badge-color: whitesmoke !default;
$search-result-badge-background-color: #33415580 !default;
$search-modal-scrollbar-background-color: gray !default;
Expand All @@ -105,5 +105,4 @@ $search-modal-selected-filter-color: whitesmoke !default;
$search-modal-selected-filter-background-color: rgba(139, 0, 139, 0.5) !default;
$search-result-highlight: hsl(48, 100%, 67%) !default;

// Sidebar input box
$documenter-search-query-text-color: rgba(0, 0, 0, 0.3) !default;
$input-placeholder-color: #707070 !default;
4 changes: 3 additions & 1 deletion assets/html/scss/documenter/layout/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@
}

#documenter-search-query {
color: $documenter-search-query-text-color;
// The search query box is a fake text input, so we re-use the
// $input-* styling here.
color: $input-placeholder-color;
width: 0.8 * $documenter-sidebar-width;
box-shadow: inset 0 1px 2px rgba(10,10,10,0.1);
}
Expand Down
2 changes: 1 addition & 1 deletion assets/html/themes/documenter-dark.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/html/themes/documenter-light.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/versions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This is here just to make the version selector show up when you build Documenter's
// manual locally when developing / debugging.
var DOC_VERSIONS = ["build"];

0 comments on commit 8a9f45d

Please sign in to comment.