Skip to content

Commit 70d714c

Browse files
authored
fix: auto-detect OS/browser color theme on initial load (#1005)
1 parent 710305e commit 70d714c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/docs/docusaurus.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ const config = {
123123
},
124124
],
125125
},
126+
colorMode: {
127+
defaultMode: 'light',
128+
disableSwitch: false,
129+
respectPrefersColorScheme: true,
130+
},
126131
prism: {
127132
theme: prismThemes.github,
128133
darkTheme: prismThemes.dracula,

packages/docs/src/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
/* You can override the default Infima variables here. */
8-
:root {
8+
[data-theme='light']:root {
99
--ifm-color-primary: #1f3e05;
1010
--ifm-color-primary-dark: #29784c;
1111
--ifm-color-primary-darker: #277148;

0 commit comments

Comments
 (0)