From 26edfc9e318d24ab3f4c3bf9927af0edd5355a19 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 6 Jan 2022 13:08:57 +0100 Subject: [PATCH] Create CSS class instead of using inline style for search results --- src/librustdoc/html/static/css/rustdoc.css | 4 ++++ src/librustdoc/html/static/js/main.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index e5c667a37c669..3defc4be3e13b 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -545,6 +545,10 @@ nav.sub { position: relative; } +.search-loading { + text-align: center; +} + #results > table { width: 100%; table-layout: fixed; diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index f81f6d5d61fed..f41c1bd817ab2 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -289,8 +289,8 @@ function hideThemeButtonState() { var params = searchState.getQueryStringParams(); if (params.search !== undefined) { var search = searchState.outputElement(); - search.innerHTML = "

" + - searchState.loadingText + "

"; + search.innerHTML = "

" + + searchState.loadingText + "

"; searchState.showResults(search); loadSearch(); }