Horizon should support multiple theme configurations

Registered by Kelly Domico

Currently, the theme can be changed through local_settings.py and is only a single value. This allows for only a single theme to be used while Horizon is running. Many times, a user will want to change a theme dynamically, through the front end. Some use cases of this are the ability to toggle between a light and dark theme, or the ability to turn on a high contrast theme for accessibility reasons. Therefore, it would be beneficial for customization to allow a configuration that supports multiple dynamic themes.

I believe that we may be able to turn the custom theme variable into a tuple, to support multiple configured themes at once. Once in a tuple, we can 'build' multiple theme by wrapping the compress tag with a for loop.

Right now, the theme structure does not currently support building multiple themes, as it has no idea WHAT theme it is building, but only that is it located at /static/custom. Some change around this logic will need to occur to push the actual theme name through the compression loop and into the

This work can be split into two patches:

1. Pull CSS by theme name
2. Angular directive to show available themes and select desired theme

Blueprint information

David Lyle
Kelly Domico
Diana Whitten
Series goal:
Milestone target:
milestone icon mitaka-3
Started by
Diana Whitten
Completed by
David Lyle

Related branches



Gerrit topic: https://review.openstack.org/#q,topic:bp/horizon-dynamic-theme,n,z

Addressed by: https://review.openstack.org/271858
    Context Picker should inherit BS dropdown styles

Addressed by: https://review.openstack.org/274372
    'material' checkmark is visible in responsive menu

Addressed by: https://review.openstack.org/274371
    Style: Material Design: navbar inherit colors

Addressed by: https://review.openstack.org/275014
    Material: Better Inverse Dropdown Header Color

Addressed by: https://review.openstack.org/277220
    WIP Dynamic Themes

Addressed by: https://review.openstack.org/279185
    Provide an integration test for dynamic themes

Gerrit topic: https://review.openstack.org/#q,topic:bp/horizon-dynamic-theme-patch15,n,z

Gerrit topic: https://review.openstack.org/#q,topic:bp/local-settings-override-mechanism,n,z

Addressed by: https://review.openstack.org/318932
    Default theme lacks support for dropup menus

Addressed by: https://review.openstack.org/318933
    Datepicker should inherit from theme

Gerrit topic: https://review.openstack.org/#q,topic:bp/horizon-theme-css-reorg-datepicker,n,z

Gerrit topic: https://review.openstack.org/#q,topic:bp/bootstrap-theme-preview,n,z


Work Items

This blueprint contains Public information 
Everyone can see this information.