-
-
Save richtabor/b6fcb8755a715c373b08c7c8fde5e78f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.has-black-background-color { | |
background-color: #2a2a2a; | |
} | |
.has-black-color { | |
background-color: #2a2a2a; | |
} | |
.has-gray-background-color { | |
background-color: #7a7a7a; | |
} | |
.has-gray-color { | |
color: #7a7a7a; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add support for custom color palettes in Gutenberg. | |
*/ | |
function tabor_gutenberg_color_palette() { | |
add_theme_support( | |
'editor-color-palette', array( | |
array( | |
'name' => esc_html__( 'Black', '@@textdomain' ), | |
'slug' => 'black', | |
'color' => '#2a2a2a', | |
), | |
array( | |
'name' => esc_html__( 'Gray', '@@textdomain' ), | |
'slug' => 'gray', | |
'color' => '#727477', | |
) | |
) | |
); | |
} | |
add_action( 'after_setup_theme', 'tabor_gutenberg_color_palette' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Adds support for editor color palette. | |
add_theme_support( 'editor-color-palette', | |
'#2a2a2a', | |
'#7a7a7a', | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
line 5 of color-classes.css should be
color: …
instead ofbackground-color: …