Skip to content

Commit

Permalink
Fix dark mode inconsistencies (mobile)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuditKaramazov committed Jan 10, 2024
1 parent 5719c9a commit 1db2877
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/layouts/Base/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const { pageTitle } = Astro.props
---

<html lang="en">
<script is:inline defer>
const theme = localStorage.getItem('@karamablog/theme') || 'light'
document.documentElement.dataset.theme = theme
</script>
<Head {...Astro.props} />
<body>
<script is:inline>
const theme = localStorage.getItem('@karamablog/theme') || 'light'
document.documentElement.dataset.theme = theme
</script>

<Header />

Expand Down

0 comments on commit 1db2877

Please sign in to comment.