From e02af4c5520cd8d5fb16b53d34a082a9ad003c9f Mon Sep 17 00:00:00 2001 From: Joseph Montanaro Date: Mon, 30 Mar 2026 20:35:46 -0400 Subject: [PATCH] get rid of animations on theme switcher --- src/components/ThemeSwitcher.astro | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/components/ThemeSwitcher.astro b/src/components/ThemeSwitcher.astro index cc22c19..ddcf29b 100644 --- a/src/components/ThemeSwitcher.astro +++ b/src/components/ThemeSwitcher.astro @@ -38,26 +38,15 @@ button { } /* hide by default, i.e. if JS isn't enabled and the data-theme attribute didn't get set, */ - visibility: hidden; - opacity: 0; - transition: - color 0.2s ease, - opacity 0.5s ease, - transform 0.5s ease; + display: none; } :global(html[data-theme="light"]) button#switch-to-dark { - opacity: 1; - visibility: visible; - transform: rotate(360deg); - /* whichever one is currently active should be on top */ - z-index: 10; + display: block; } + :global(html[data-theme="dark"]) button#switch-to-light { - opacity: 1; - visibility: visible; - transform: rotate(-360deg); - z-index: 10; + display: block; }