Skip to content

Commit

Permalink
fix: toggle theme
Browse files Browse the repository at this point in the history
  • Loading branch information
vhnam committed Jan 29, 2025
1 parent a2af99c commit acf88bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ThemeToggle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
aria-label="Theme Switcher"
id="themeToggle"
type="button"
class="block group flex items-center font-semibold theme-toggler"
class="block group flex items-center font-semibold theme-toggler hover:cursor-pointer"
>
<svg width="1rem" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
Expand Down
2 changes: 2 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
--color-primary: var(--color-sky-500);
}

@custom-variant dark (&:where([data-mode=dark], [data-mode=dark] *));

[data-mode="light"] {
body {
@apply bg-slate-100 text-slate-700 transition-colors;
Expand Down

0 comments on commit acf88bb

Please sign in to comment.