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; }