Skip to content

Commit 5c31880

Browse files
committed
rustdoc-search: use a throbbler with no motion
This change is a response to complaints about motion sickness.
1 parent 2773d24 commit 5c31880

File tree

1 file changed

+13
-35
lines changed

1 file changed

+13
-35
lines changed

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

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,50 +2012,28 @@ a.tooltip:hover::after {
20122012
height: 34px;
20132013
}
20142014

2015-
.search-throbber::before,
2016-
.search-form.loading::before
2017-
{
2018-
width: 16px;
2019-
height: 16px;
2020-
border-radius: 16px;
2021-
background: radial-gradient(
2022-
var(--button-background-color) 0 50%,
2023-
transparent 50% 100%
2024-
), conic-gradient(
2025-
var(--code-highlight-kw-color) 0deg 30deg,
2026-
var(--code-highlight-prelude-color) 30deg 60deg,
2027-
var(--code-highlight-number-color) 90deg 120deg,
2028-
var(--code-highlight-lifetime-color ) 120deg 150deg,
2029-
var(--code-highlight-comment-color) 150deg 180deg,
2030-
var(--code-highlight-self-color) 180deg 210deg,
2031-
var(--code-highlight-attribute-color) 210deg 240deg,
2032-
var(--code-highlight-literal-color) 210deg 240deg,
2033-
var(--code-highlight-macro-color) 240deg 270deg,
2034-
var(--code-highlight-question-mark-color) 270deg 300deg,
2035-
var(--code-highlight-prelude-val-color) 300deg 330deg,
2036-
var(--code-highlight-doc-comment-color) 330deg 360deg
2037-
);
2038-
content: "";
2039-
position: absolute;
2040-
right: 9px;
2041-
top: 8px;
2042-
animation: rotating 1.25s linear infinite;
2043-
}
20442015
.search-throbber::after,
20452016
.search-form.loading::after
20462017
{
20472018
width: 18px;
20482019
height: 18px;
20492020
border-radius: 18px;
2050-
background: conic-gradient(
2051-
var(--button-background-color) 0deg 180deg,
2052-
transparent 270deg 360deg
2053-
);
2054-
content: "";
2021+
/* hourglass */
2022+
content: url('data:image/svg+xml,\
2023+
<svg width="16" height="16" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">\
2024+
<g fill="none">\
2025+
<path d="m3.019 1.496v1.496l0.5878 1.018-0.5751 0.996v1.494" stroke="%233f3f3f"/>\
2026+
<path d="m5.003 1.496v1.496l-0.5878 1.018 0.5751 0.996v1.494" stroke="%233f3f3f"/>\
2027+
<path d="m2.006 1.5h3.978" stroke="%23000"/>\
2028+
<path d="m2.006 6.49h3.993" stroke="%23000"/>\
2029+
</g>\
2030+
<path d="m4.005 5.301-0.3987 0.6905h0.7977z" fill="%237f7f7f"/>\
2031+
<path d="m4.011 3.712-0.3987-0.6905h0.7977z" fill="%237f7f7f"/>\
2032+
</svg>');
20552033
position: absolute;
20562034
right: 8px;
20572035
top: 8px;
2058-
animation: rotating 0.66s linear infinite;
2036+
filter: var(--settings-menu-filter);
20592037
}
20602038

20612039
#search .error code {

0 commit comments

Comments
 (0)