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 @@ -1955,7 +1955,13 @@ a.tooltip:hover::after {
1955
1955
color : transparent;
1956
1956
}
1957
1957
1958
- # search-tabs .count .loading ::before {
1958
+ .search-form .loading {
1959
+ --search-tab-button-background : var (--button-background-color );
1960
+ }
1961
+
1962
+ # search-tabs .count .loading ::before ,
1963
+ .search-form .loading ::before
1964
+ {
1959
1965
width : 16px ;
1960
1966
height : 16px ;
1961
1967
border-radius : 16px ;
@@ -1982,7 +1988,9 @@ a.tooltip:hover::after {
1982
1988
top : 2px ;
1983
1989
animation : rotating 1.25s linear infinite;
1984
1990
}
1985
- # search-tabs .count .loading ::after {
1991
+ # search-tabs .count .loading ::after ,
1992
+ .search-form .loading ::after
1993
+ {
1986
1994
width : 18px ;
1987
1995
height : 18px ;
1988
1996
border-radius : 18px ;
@@ -1997,6 +2005,18 @@ a.tooltip:hover::after {
1997
2005
animation : rotating 0.66s linear infinite;
1998
2006
}
1999
2007
2008
+ .search-form .loading ::before {
2009
+ left : auto;
2010
+ right : 9px ;
2011
+ top : 8px ;
2012
+ }
2013
+
2014
+ .search-form .loading ::after {
2015
+ left : auto;
2016
+ right : 8px ;
2017
+ top : 8px ;
2018
+ }
2019
+
2000
2020
# search .error code {
2001
2021
border-radius : 3px ;
2002
2022
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