-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Is your feature request related to a problem? Please describe.
Themes can define custom colors with custom names (eg "Goblin Green"). If an author uses a custom color as a background in a post, and then switches to another theme which does not have this color defined, a fallback takes place and the color disappears.
Describe the solution you'd like
There should be a defined color array and naming convention established which enables theme developers to use the same names for colors and coordinate these colors with their themes. That way when an author uses a color customized for one theme and switches to another theme, the color changes with the theme and the expected behavior is preserved.
Theme developers should be encouraged to always define these colors and use this naming convention, and only use custom colors and color names in situations where they are doing something out of the ordinary.
The naming convention could have a protected prefix like "theme",
Some colors should always be defined:
theme-primary = key / primary color
theme-secondary = secondary color
theme-background = color intended as primary background (contrasts to theme-foreground)
theme-foreground = color intended as primary foreground (contrasts to theme-background)
Additionally some standard color names should be protected and definitions encouraged:
theme-red
theme-orange
theme-yellow
theme-green
theme-blue
theme-indigo
theme-violet
theme-black
theme-grey-dark
theme-grey-light
theme-white
For all these color definitions core should provide fallbacks.
Employing this kind of naming convention (or something like it) will ensure a seamless transition between themes while allowing theme developers full control over exactly what colors are in use and where.