nuxt-modules / nuxt-modules/color-mode
Should there be a way to force a color mode in the root of the app?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 123
- Avg merge
- 3h 57m
- Merged PRs (30d)
- 9
Description
Should it be possible to define the page meta in the app.vue?
The problem:
If I have 90% of pages that I want in dark mode, I should be able to do it by only forcing light mode in the 10%, not forcing dark in the 90%. Does this make sense?
In the docs it says the only way to force a color mode is by using definePageMeta, and preference does not overrides the colorMode that system has.
The solution: (?)
// app.vue
definePageMeta({
colorMode: 'dark',
})
// forces dark mode to all pages by default.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current colorMode handling documented for definePageMeta and how app.vue is treated in Nuxt. Determine whether a root-level default can be supported without changing page-specific overrides, then document the expected precedence and add tests covering root defaults and per-page exceptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100