Skip to content

Conversation

ga676005
Copy link
Contributor

@ga676005 ga676005 commented Jul 4, 2023

I found this option is quite useful but it is currently missing in the document.

@nuxt-studio
Copy link

nuxt-studio bot commented Jul 4, 2023

Live Preview ready!

Name Edit Preview Latest Commit
Color Mode Edit on Studio ↗︎ View Live Preview 5bd4a9b

@netlify
Copy link

netlify bot commented Jul 4, 2023

Deploy Preview for nuxt-color-mode canceled.

Name Link
🔨 Latest commit 5bd4a9b
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-color-mode/deploys/64d24ab60fe52200075fe26e

@@ -149,6 +149,7 @@ export default defineNuxtConfig({

Notes:
- `'system'` is a special value; it will automatically detect the color mode based on the system preferences (see [prefers-color-mode spec](https://drafts.csswg.org/mediaqueries-5/#descdef-media-prefers-color-mode)). The value injected will be either `'light'` or `'dark'`. If `no-preference` is detected or the browser does not handle color-mode, it will set the `fallback` value.
- Optional `colorMode.dataValue` lets you add dataset to the `html`, for example if you currently have `class="dark"` on `html`, `dataValue: 'theme'` will also set `data-theme="dark"` on `html`. This is useful when using library like daisyUI that uses `data-theme="light"` on `html` to apply theme.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is worth to be as a "note" as I see it's a regular option. We could list it in the example above with a short description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great. I didn't know where to put it so I added it close to the other options.

@atinux atinux merged commit e95dcc7 into nuxt-modules:master Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants