From e54d5b28e9f5ce7a3aa58707cb2f93001d2607f8 Mon Sep 17 00:00:00 2001 From: "Mohammad J. Zamani" Date: Tue, 16 Jul 2024 13:02:40 +0000 Subject: [PATCH 1/2] fix: color mode depends just on the app mode --- src/css/custom.css | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 0014da5cb..b9917af4b 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -28,8 +28,8 @@ --ifm-color-primary-lightest: #7d94f9; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } */ - -:root { +:root, +html[data-theme='light'] { --ifm-color-primary: #e20074; --ifm-color-primary-dark: #cb0068; --ifm-color-primary-darker: #c00063; @@ -39,12 +39,13 @@ --ifm-color-primary-lightest: #ff2796; --ifm-footer-background-color: var(--background-footer); --ifm-footer-link-color: black; - --ifm-code-font-size: 90%; /*95%;*/ + --ifm-code-font-size: 90%; --ifm-font-family-base: 'TeleNeoWeb'; + --ifm-background-color: #ffffff; + --ifm-background-surface-color: #ffffff; } [data-theme='dark'] { - /* --ifm-color-primary: #7d94f9; */ --ifm-color-primary: #ff2796; --ifm-color-primary-dark: #5977f7; --ifm-color-primary-darker: #4768f7; @@ -52,10 +53,19 @@ --ifm-color-primary-light: #a1b1fb; --ifm-color-primary-lighter: #b3c0fb; --ifm-color-primary-lightest: #e8ecfe; - --ifm-background-color: #5977f7; - --ifm-background-surface-color: #5977f7; + --ifm-background-color: #1b1b1d; + --ifm-background-surface-color: #1b1b1d; } +/* Override system color scheme preference */ +@media (prefers-color-scheme: dark) { + html[data-theme='light'] { + --ifm-background-color: #ffffff; + --ifm-background-surface-color: #ffffff; + } +} + + @media screen and (max-width: 996px) { :root { --ifm-font-size-base: 18px; From d169bf2b0a9c3ee6c3f0042290dcbec9b3437c1c Mon Sep 17 00:00:00 2001 From: "Mohammad J. Zamani" Date: Wed, 17 Jul 2024 09:20:12 +0000 Subject: [PATCH 2/2] fix: font to 95 --- src/css/custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/custom.css b/src/css/custom.css index b9917af4b..552ca9bff 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -39,7 +39,7 @@ html[data-theme='light'] { --ifm-color-primary-lightest: #ff2796; --ifm-footer-background-color: var(--background-footer); --ifm-footer-link-color: black; - --ifm-code-font-size: 90%; + --ifm-code-font-size: 95%; --ifm-font-family-base: 'TeleNeoWeb'; --ifm-background-color: #ffffff; --ifm-background-surface-color: #ffffff;