File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -1959,7 +1959,13 @@ a.tooltip:hover::after {
1959
1959
color : transparent;
1960
1960
}
1961
1961
1962
- # search-tabs .count .loading ::before {
1962
+ .search-form .loading {
1963
+ --search-tab-button-background : var (--button-background-color );
1964
+ }
1965
+
1966
+ # search-tabs .count .loading ::before ,
1967
+ .search-form .loading ::before
1968
+ {
1963
1969
width : 16px ;
1964
1970
height : 16px ;
1965
1971
border-radius : 16px ;
@@ -1986,7 +1992,9 @@ a.tooltip:hover::after {
1986
1992
top : 2px ;
1987
1993
animation : rotating 1.25s linear infinite;
1988
1994
}
1989
- # search-tabs .count .loading ::after {
1995
+ # search-tabs .count .loading ::after ,
1996
+ .search-form .loading ::after
1997
+ {
1990
1998
width : 18px ;
1991
1999
height : 18px ;
1992
2000
border-radius : 18px ;
@@ -2001,6 +2009,18 @@ a.tooltip:hover::after {
2001
2009
animation : rotating 0.66s linear infinite;
2002
2010
}
2003
2011
2012
+ .search-form .loading ::before {
2013
+ left : auto;
2014
+ right : 9px ;
2015
+ top : 8px ;
2016
+ }
2017
+
2018
+ .search-form .loading ::after {
2019
+ left : auto;
2020
+ right : 8px ;
2021
+ top : 8px ;
2022
+ }
2023
+
2004
2024
# search .error code {
2005
2025
border-radius : 3px ;
2006
2026
background-color : var (--search-error-code-background-color );
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ function preLoadCss(cssUrl) {
256
256
const params = window . searchState . getQueryStringParams ( ) ;
257
257
const autofocusParam = params . search === "" ? "autofocus" : "" ;
258
258
hdr . innerHTML = `<nav class="sub">
259
- <form class="search-form">
259
+ <form class="search-form loading ">
260
260
<span></span> <!-- This empty span is a hacky fix for Safari: see #93184 -->
261
261
<input
262
262
${ autofocusParam }
Original file line number Diff line number Diff line change @@ -5075,6 +5075,11 @@ const database = await Stringdex.loadDatabase(hooks);
5075
5075
if ( typeof window !== "undefined" ) {
5076
5076
docSearch = new DocSearch ( ROOT_PATH , database ) ;
5077
5077
await docSearch . buildIndex ( ) ;
5078
+ onEachLazy ( document . querySelectorAll (
5079
+ ".search-form.loading" ,
5080
+ ) , form => {
5081
+ removeClass ( form , "loading" ) ;
5082
+ } ) ;
5078
5083
registerSearchEvents ( ) ;
5079
5084
// If there's a search term in the URL, execute the search now.
5080
5085
if ( window . searchState . getQueryStringParams ( ) . search !== undefined ) {
You can’t perform that action at this time.
0 commit comments