From 67865fc5adb230c0cfb74385482665b0caf87172 Mon Sep 17 00:00:00 2001 From: Danny Liu Date: Wed, 27 Mar 2024 22:39:47 -0700 Subject: [PATCH] dynamically adjust --color-gray-950 value for OLED black sidebar --- src/app.html | 1 + src/lib/components/chat/Settings/General.svelte | 2 ++ tailwind.config.js | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app.html b/src/app.html index 45b5d20e7..c9f86d8f6 100644 --- a/src/app.html +++ b/src/app.html @@ -11,6 +11,7 @@ (() => { if (localStorage.theme.includes('oled')) { document.documentElement.style.setProperty('--color-gray-900', '#000000'); + document.documentElement.style.setProperty('--color-gray-950', '#000000'); document.documentElement.classList.add('dark'); } else if ( diff --git a/src/lib/components/chat/Settings/General.svelte b/src/lib/components/chat/Settings/General.svelte index 3da335170..3b7126d85 100644 --- a/src/lib/components/chat/Settings/General.svelte +++ b/src/lib/components/chat/Settings/General.svelte @@ -99,6 +99,7 @@ if (themeToApply === 'dark' && !_theme.includes('oled')) { document.documentElement.style.setProperty('--color-gray-900', '#171717'); + document.documentElement.style.setProperty('--color-gray-950', '#0d0d0d'); } themes @@ -121,6 +122,7 @@ localStorage.setItem('theme', _theme); if (_theme.includes('oled')) { document.documentElement.style.setProperty('--color-gray-900', '#000000'); + document.documentElement.style.setProperty('--color-gray-950', '#000000'); document.documentElement.classList.add('dark'); } applyTheme(_theme); diff --git a/tailwind.config.js b/tailwind.config.js index 63413ccdb..9caccabf5 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -17,7 +17,7 @@ export default { 800: '#333', 850: '#262626', 900: 'var(--color-gray-900, #171717)', - 950: '#0d0d0d' + 950: 'var(--color-gray-950, #0d0d0d)' } }, typography: {