question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Admin color themes and customization?

See original GitHub issue

Iā€™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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
thibaudcolascommented, Jan 17, 2021

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.

4reactions
thibaudcolascommented, Jul 8, 2020

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:

  • Refactoring some (or all) of our existing Sass variables colors to CSS variables (custom properties). Most / all of our code has already been refactored to use the Sass variables as part of the colour contrast improvements, so moving this over to CSS variables shouldnā€™t be too much work.
  • Documenting on https://docs.wagtail.io/en/stable/advanced_topics/customisation/admin_templates.html which color variables are available
  • Additionally having a few words about adding a custom stylesheet that implements those overrides.

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 šŸ˜¬ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create WordPress Custom Admin Color Scheme
Since WordPress 3.8, you can style the color for your admin dashboard via WordPress settings. To do that, simply navigate to ā€œUsersā€ >...
Read more >
How to Change the Admin Color Scheme in WordPress (Quick ...
If you want even more color choices for your admin dashboard, then you can create custom color schemes and upload them to your...
Read more >
Customize WordPress Admin Color Scheme - Hongkiat
It also introduces 8 new colors: Fresh (set as the default), Light, Blue, Midnight, Coffee, Ectoplasm, Ocean, and Sunrise to spice-up the UI....
Read more >
Admin Color Schemes ā€“ WordPress plugin
12 new color schemes for your admin. Color schemes in this pack designed by Kate Whitley, Dave Whitley, Mel Choyce, and Kelly Dwan....
Read more >
Customize the Microsoft 365 theme for your organization
Colors : Choose theme colors Ā· Navigation bar color: Select a color to use for the background of the navigation bar. Ā· Text...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found