about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/main.js
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-05-05 19:34:24 -0700
committerGitHub <noreply@github.com>2022-05-05 19:34:24 -0700
commit292eefe753a007af30329b6dbb3f1cbc840e4bf2 (patch)
tree0c3fb18ba1efa769db34078dbc7481e7399928e8 /src/librustdoc/html/static/js/main.js
parentef949daf036b77795ee03c4ec470713ddd18ff07 (diff)
parent13b45aa6c66c8075acc95ea94d8c5cbc24a3a203 (diff)
downloadrust-292eefe753a007af30329b6dbb3f1cbc840e4bf2.tar.gz
rust-292eefe753a007af30329b6dbb3f1cbc840e4bf2.zip
Rollup merge of #96704 - GuillaumeGomez:rotation-animation, r=jsha
Add rotation animation on settings button when loading

As discussed, I added an animation when the settings JS file is loading (I voluntarily made the timeout at the end of the `settings.js` super long so we can see what the animation looks like):

https://user-images.githubusercontent.com/3050060/166693243-816a08b7-5e39-4142-acd3-686ad9950d8e.mp4

r? ````@jsha````
Diffstat (limited to 'src/librustdoc/html/static/js/main.js')
-rw-r--r--src/librustdoc/html/static/js/main.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js
index 667f89c07e2..e8edd5f2d23 100644
--- a/src/librustdoc/html/static/js/main.js
+++ b/src/librustdoc/html/static/js/main.js
@@ -301,6 +301,7 @@ function loadCss(cssFileName) {
     }
 
     getSettingsButton().onclick = event => {
+        addClass(getSettingsButton(), "rotate");
         event.preventDefault();
         loadScript(window.settingsJS);
     };