Skip to content

Commit 60892b6

Browse files
committed
dark mode toggle working
1 parent 1a7ea6b commit 60892b6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

elements/clean-portfolio-theme/clean-portfolio-theme.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ export class CleanPortfolioTheme extends DDDSuper(HAXCMSLitElementTheme) {
307307
background-color: var(--portfolio-lightDark-bg);
308308
font-family: var(--portfolio-font-body);
309309
font-size: var(--portfolio-fontsize-responsive);
310-
310+
color-scheme: light dark;
311+
scroll-behavior: smooth;
311312
/* theme colors */
312313
--portfolio-earth-accentLight: #689f38;
313314
--portfolio-earth-accentDark: #33691e;
@@ -322,6 +323,10 @@ export class CleanPortfolioTheme extends DDDSuper(HAXCMSLitElementTheme) {
322323
--portfolio-violet-accentLight: #a27dff;
323324
--portfolio-violet-accentDark: #392b6a;
324325
}
326+
327+
body.dark-mode {
328+
color-scheme: only dark;
329+
}
325330
`
326331
];
327332
}

0 commit comments

Comments
 (0)