From 380fae1ccdde16a93672a629d7b1e52978d3809c Mon Sep 17 00:00:00 2001 From: Matt Fiddaman Date: Mon, 4 Aug 2025 14:22:51 -0400 Subject: [PATCH] fix tag colors when using the light theme as system default (#5457) * fix tag colouring on system default light theme * note --- packages/desktop-client/src/style/tags.ts | 6 ++++++ upcoming-release-notes/5457.md | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 upcoming-release-notes/5457.md diff --git a/packages/desktop-client/src/style/tags.ts b/packages/desktop-client/src/style/tags.ts index 76dd9b870c..032672f568 100644 --- a/packages/desktop-client/src/style/tags.ts +++ b/packages/desktop-client/src/style/tags.ts @@ -25,6 +25,12 @@ export function useTags() { } function getTagCSSColors(theme: Theme, color?: string | null) { + if (theme === 'auto') { + theme = window.matchMedia('(prefers-color-scheme: light)').matches + ? 'light' + : 'dark'; + } + if (theme === 'light') { return [ color ? `${color} !important` : themeStyle.noteTagText, diff --git a/upcoming-release-notes/5457.md b/upcoming-release-notes/5457.md new file mode 100644 index 0000000000..18cc81674f --- /dev/null +++ b/upcoming-release-notes/5457.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [matt-fidd] +--- + +Fix tag colors when using the light theme as system default