From 779f5d9b3df00004306da72c11ce156103e9dcaf Mon Sep 17 00:00:00 2001 From: ztz <36158219+ZTzTopia@users.noreply.github.com> Date: Tue, 12 Mar 2024 23:48:23 +0800 Subject: [PATCH] feat(web): dark color-scheme css for dark mode (#7812) * feat(web): dark color-scheme css for dark mode * use dark classes instead of adding data property * fix code format * fix typo --------- Co-authored-by: Alex Tran --- web/src/app.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/src/app.css b/web/src/app.css index 54cd03b89d..c361d890cb 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -23,6 +23,7 @@ --immich-dark-warning: 245 124 0; } } + @font-face { font-family: 'Overpass'; src: url('$lib/assets/fonts/overpass/Overpass.ttf') format('truetype-variations'); @@ -48,6 +49,14 @@ --navbar-height: calc(theme(spacing.18) + 4px); } +:root.dark { + color-scheme: dark; +} + +:root:not(.dark) { + color-scheme: light; +} + html { height: 100%; width: 100%;