Skip to content

Commit 759b13e

Browse files
authoredJan 8, 2022
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 #92404. :) r? ``@jsha``
2 parents d43c9ad + 26edfc9 commit 759b13e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎src/librustdoc/html/static/css/rustdoc.css

+4
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,10 @@ nav.sub {
545545
position: relative;
546546
}
547547

548+
.search-loading {
549+
text-align: center;
550+
}
551+
548552
#results > table {
549553
width: 100%;
550554
table-layout: fixed;

‎src/librustdoc/html/static/js/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ function hideThemeButtonState() {
289289
var params = searchState.getQueryStringParams();
290290
if (params.search !== undefined) {
291291
var search = searchState.outputElement();
292-
search.innerHTML = "<h3 style=\"text-align: center;\">" +
293-
searchState.loadingText + "</h3>";
292+
search.innerHTML = "<h3 class=\"search-loading\">" +
293+
searchState.loadingText + "</h3>";
294294
searchState.showResults(search);
295295
loadSearch();
296296
}

0 commit comments

Comments
 (0)
Please sign in to comment.