-
Couldn't load subscription status.
- Fork 1.2k
Dark Mode: new custom theme extension syntax #1174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good for me! Thanks for the update, Mégane!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the update 💃
| To extend the theme, use either: | ||
| - the `config.theme.light` key for the Light mode | ||
| - the `config.theme.dark` key for the Dark mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd omit that and add a comment in the above code example instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think a comment in the code example should replace this explanation, especially since otherwise there's no proper information about how to extend the theme in the "Theme extension" section. I'll leave this here. But I integrated all you other suggestions, thank you for your review!
| ::: note | ||
| Strapi applications can be displayed either in Light or Dark mode (see [administrator profile setup in the User Guide](/user-docs/latest/getting-started/introduction.md#setting-up-your-administrator-profile)), however custom theme extension is only applied for Light mode. When choosing Dark mode for a Strapi application, theme customizations are ignored. | ||
| ::: caution | ||
| The former syntax `config.theme` to extend the theme will soon be deprecated by Strapi, and will stop being supported when the next major release is available. We encourage you to update any custom theme using the new syntax that supports custom development for both Light and Dark modes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The former syntax `config.theme` to extend the theme will soon be deprecated by Strapi, and will stop being supported when the next major release is available. We encourage you to update any custom theme using the new syntax that supports custom development for both Light and Dark modes. | |
| The former syntax for `config.theme` without `light` or `dark` keys is deprecated at will be removed in the next major release. We encourage you to update your custom theme to use the new syntax that supports light and dark modes. |
Co-authored-by: Gustav Hansen <gu@stav.dev>
Co-authored-by: Gustav Hansen <gu@stav.dev>
Co-authored-by: Gustav Hansen <gu@stav.dev>
Update of Admin customization documentation:
config.themeis being replaced withconfig.theme.lightandconfig.theme.dark👉 See contribution PR