Admin color themes and customization?
See original GitHub issueIām working on customizing the wagtail admin for a deployment and am finding it a bit challenging to catch all the locations where color schemes (background, font, hover, etc.) need to be overridden.
The basic color variables are easy to redefine in the _variables.scss partial, but itās quite challenging to either rebuild core.css from scratch and/or to generate a custom-core.css file that doesnāt contain a lot of duplicate styles. This is primarily due to the structure of the imports. Iād say that finding a way to avoid
#wagtail {
@import '../../../../../client/scss/style';
}
in core.scss would probably be the easiest first step in terms of being able to build a theming stylesheet.
Are there any roadmap items for addressing the need of users to do this type of customization and if so, are there any ways to help move this forward?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:19 (10 by maintainers)
Top GitHub Comments
Thank you to @JNaftali for making this happen via #6409 š We can now customize 5 of Wagtailās colors via very straightforward CSS custom properties definitions. See the full documentation.
This will be released in Wagtail 2.12.
I will close this now ā if anyone wants to see more things being customizable in the admin I think this will warrant a new issue. As much as possible, make sure to suggest specific customizations, provide the clear use case you have for them, with screenshots if applicable.
For people interested in this, we now have an issue to track / discuss removing support for IE11: #6170.
This alone wonāt make Wagtail any more theme-able, but again itāll allow us to start using CSS variables in Wagtailās stylesheets without much effort, which will make theming much easier for colours (and fonts, and other design tokens, if relevant).
I can see this happening like this:
If anyone wants to see this happen sooner, Iād also welcome a proposal (/ WIP PR) to explore what this looks like with https://github.com/postcss/postcss-custom-properties for IE11 support.
An added benefit of this approach is that it should also make it very easy for us to add ādark modeā support to Wagtailā¦ no one has asked for it yet, but personally I think itād be quite cool š¬ .