mirror of https://github.com/rust-lang/rust.git
Hide search bar in noscript.css
Also, remove the highlighting of the search bar in disabled state. This reduces flicker when loading a page.
This commit is contained in:
parent
c7e4740ec1
commit
a4fe76ff7c
|
@ -13,3 +13,12 @@ rules.
|
|||
/* It requires JS to work so no need to display it in this case. */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sub {
|
||||
/* The search bar and related controls don't work without JS */
|
||||
display: none;
|
||||
}
|
||||
|
||||
#theme-picker {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -255,10 +255,6 @@ details.undocumented > summary::before {
|
|||
box-shadow: 0 0 0 1px #148099,0 0 0 2px transparent;
|
||||
}
|
||||
|
||||
.search-input:disabled {
|
||||
background-color: #3e3e3e;
|
||||
}
|
||||
|
||||
.module-item .stab,
|
||||
.import-item .stab {
|
||||
color: #000;
|
||||
|
|
|
@ -219,10 +219,6 @@ details.undocumented > summary::before {
|
|||
border-color: #008dfd;
|
||||
}
|
||||
|
||||
.search-input:disabled {
|
||||
background-color: #c5c4c4;
|
||||
}
|
||||
|
||||
#crate-search + .search-input:focus {
|
||||
box-shadow: 0 0 8px 4px #078dd8;
|
||||
}
|
||||
|
|
|
@ -209,10 +209,6 @@ details.undocumented > summary::before {
|
|||
border-color: #66afe9;
|
||||
}
|
||||
|
||||
.search-input:disabled {
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
#crate-search + .search-input:focus {
|
||||
box-shadow: 0 0 8px #078dd8;
|
||||
}
|
||||
|
|
|
@ -263,7 +263,9 @@ function hideThemeButtonState() {
|
|||
search_input.placeholder = searchState.input.origPlaceholder;
|
||||
});
|
||||
|
||||
search_input.removeAttribute('disabled');
|
||||
if (search_input.value != '') {
|
||||
loadSearch();
|
||||
}
|
||||
|
||||
// `crates{version}.js` should always be loaded before this script, so we can use it
|
||||
// safely.
|
||||
|
|
|
@ -85,7 +85,6 @@
|
|||
<input {# -#}
|
||||
class="search-input" {# -#}
|
||||
name="search" {# -#}
|
||||
disabled {# -#}
|
||||
autocomplete="off" {# -#}
|
||||
spellcheck="false" {# -#}
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// When JavaScript is disabled, we hide the search bar, because it
|
||||
// can't be used without JS.
|
||||
javascript: false
|
||||
|
||||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
|
||||
assert-css: (".sub", {"display": "none"})
|
Loading…
Reference in New Issue