Rollup merge of #92610 - GuillaumeGomez:css-class-instead-of-inline-style, r=jsha

Create CSS class instead of using inline style for search results

I saw this change in the update you proposed in https://github.com/rust-lang/rust/pull/92404. :)

r? ``@jsha``
This commit is contained in:
Eric Huss 2022-01-07 20:21:01 -08:00 committed by GitHub
commit 759b13eb6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -545,6 +545,10 @@ nav.sub {
position: relative; position: relative;
} }
.search-loading {
text-align: center;
}
#results > table { #results > table {
width: 100%; width: 100%;
table-layout: fixed; table-layout: fixed;

View File

@ -289,8 +289,8 @@ function hideThemeButtonState() {
var params = searchState.getQueryStringParams(); var params = searchState.getQueryStringParams();
if (params.search !== undefined) { if (params.search !== undefined) {
var search = searchState.outputElement(); var search = searchState.outputElement();
search.innerHTML = "<h3 style=\"text-align: center;\">" + search.innerHTML = "<h3 class=\"search-loading\">" +
searchState.loadingText + "</h3>"; searchState.loadingText + "</h3>";
searchState.showResults(search); searchState.showResults(search);
loadSearch(); loadSearch();
} }