From 0f4d7af108da6f063c7a6f52cb720e003ac69889 Mon Sep 17 00:00:00 2001 From: nasso Date: Thu, 22 Dec 2022 05:25:48 +0000 Subject: [PATCH] docs: update configuration options --- website/docs/api/docusaurus.config.js.md | 3 +-- website/docs/api/themes/theme-configuration.md | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/website/docs/api/docusaurus.config.js.md b/website/docs/api/docusaurus.config.js.md index 87a4525e0a66f..80421260c4410 100644 --- a/website/docs/api/docusaurus.config.js.md +++ b/website/docs/api/docusaurus.config.js.md @@ -297,9 +297,8 @@ module.exports = { }, }, colorMode: { - defaultMode: 'light', + defaultMode: 'auto', disableSwitch: false, - respectPrefersColorScheme: true, }, navbar: { title: 'Site Title', diff --git a/website/docs/api/themes/theme-configuration.md b/website/docs/api/themes/theme-configuration.md index 5ad039269351d..efcac607c080e 100644 --- a/website/docs/api/themes/theme-configuration.md +++ b/website/docs/api/themes/theme-configuration.md @@ -27,9 +27,8 @@ Accepted fields: | Name | Type | Default | Description | | --- | --- | --- | --- | -| `defaultMode` | 'light' \| 'dark' | `'light'` | The color mode when user first visits the site. | +| `defaultMode` | 'light' \| 'dark' \| 'auto' | `'light'` | The color mode when user first visits the site. | | `disableSwitch` | `boolean` | `false` | Hides the switch in the navbar. Useful if you want to support a single color mode. | -| `respectPrefersColorScheme` | `boolean` | `false` | Whether to use the `prefers-color-scheme` media-query, using user system preferences, instead of the hardcoded `defaultMode`. | ```mdx-code-block @@ -44,7 +43,6 @@ module.exports = { colorMode: { defaultMode: 'light', disableSwitch: false, - respectPrefersColorScheme: false, }, // highlight-end }, @@ -53,9 +51,9 @@ module.exports = { :::caution -With `respectPrefersColorScheme: true`, the `defaultMode` is overridden by user system preferences. +With `defaultMode: auto`, the theme is determined by user system preferences. -If you only want to support one color mode, you likely want to ignore user system preferences. +If you only want to support one color mode, you likely want to set `defaultMode: light` or `defaultMode: dark` instead. :::