WordPress / gutenberg-starter-theme

A simple theme for testing Gutenberg.
GNU General Public License v2.0
683 stars 163 forks source link

Add contextual color classes for editor color palette colors #71

Closed richtabor closed 6 years ago

richtabor commented 6 years ago

Describe the bug Colors are not being appropriately rendered on the front-end of core blocks, as they're not defined within the theme's styles.

Expected behavior The colors (background/color) are applied on the front-end, with the use of proper contextual color classes.

Screenshots

screen shot 2018-07-25 at 10 01 04 am screen shot 2018-07-25 at 9 59 24 am

Additional context From the Gutenberg doc on the editor color palette (link):

Themes are responsible for creating the classes that apply the colors in different contexts. Core blocks use "color" and "background-color" contexts. So to correctly apply "strong magenta" to all contexts of core blocks a theme should implement the following classes:

.has-strong-magenta-background-color {
    background-color: #313131;
}

.has-strong-magenta-color {
    color: #f78da7;
}
kjellr commented 6 years ago

Closed via #72.