Add a feature flag to force dark mode #4303
Labels
💻 aspect: code
Concerns the software code in the repository
🌟 goal: addition
Addition of new feature
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: frontend
Related to the Nuxt frontend
Milestone
Description
Create a new
force_dark_mode
feature flag, which allows developers to test dark mode without exposing the dark mode color palette to users.The flag should have the following state:
This PR should also read the
force_dark_mode
feature flag and use its value to set a class on the body element (Please note that the original implementation plan reccommended the html element, but that the body is better-suited for visual classes like this). The original implementation plan didn't provide specifics into how to do this. For Nuxt 2 (and possibly Nuxt 3), we will likely want to use thehead()
method of each of our layout components to set the class like so:It may also, then, suit the scope of this PR to create a
useDarkMode
composable now to use in these layouts:Implemented like so:
The text was updated successfully, but these errors were encountered: