Skip to content

Commit

Permalink
feat: sets the right theme color (for iPhones)
Browse files Browse the repository at this point in the history
  • Loading branch information
filoozom committed Oct 27, 2023
1 parent 29e3e93 commit 5447fac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/utils/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,10 @@ export function changeColors(baseColor: string, darkMode: DarkMode) {
document.documentElement.style.removeProperty(name)
document.documentElement.style.removeProperty(`${name}-rgb`)
})

// Set theme color
const themeColorNode = document.querySelector('meta[name="theme-color"]') as HTMLMetaElement
if (themeColorNode) {
themeColorNode.content = isDarkMode ? '#000000' : '#ffffff'
}
}

0 comments on commit 5447fac

Please sign in to comment.