Smoother dark mode switch

This commit is contained in:
Martin Prokoph
2025-01-01 14:35:52 +01:00
parent 7f6b237a68
commit 10acafcc9b
4 changed files with 7 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
import { Icon } from 'astro-icon/components'
---
<fancy-dark-mode>
<button class="darkmode-toggle mr-4 xl:mr-0" aria-expanded="false" aria-label="Toggle dark mode">
<button class="darkmode-toggle ml-1.5" aria-expanded="false" aria-label="Toggle dark mode">
<div id="animation-icon" class="hidden"/>
<Icon is:inline={true} id="light" class="hidden" name="line-md:sunny" width="32" height="32"/>
<Icon is:inline={true} id="dark" class="hidden" name="line-md:moon" width="32" height="32" />