Remove hardcoded color values and use values from customizer instead

This commit is contained in:
Tiago Noronha 2018-12-12 17:58:43 +00:00
parent 0278058a0b
commit 04eb2f26a4
2 changed files with 21 additions and 63 deletions

View file

@ -832,33 +832,36 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
// Gutenberg.
$styles = '
.wp-block-button .wp-block-button__link {
border-color: ' . $storefront_theme_mods['button_background_color'] . ';
}
.wp-block-button:not(.has-text-color) .wp-block-button__link {
.wp-block-button__link:not(.has-text-color) {
color: ' . $storefront_theme_mods['button_text_color'] . ';
}
.wp-block-button:not(.has-text-color) .wp-block-button__link:hover,
.wp-block-button:not(.has-text-color) .wp-block-button__link:focus,
.wp-block-button:not(.has-text-color) .wp-block-button__link:active {
.wp-block-button__link:not(.has-text-color):hover,
.wp-block-button__link:not(.has-text-color):focus,
.wp-block-button__link:not(.has-text-color):active {
color: ' . $storefront_theme_mods['button_text_color'] . ';
}
.wp-block-button:not(.has-background) .wp-block-button__link {
.wp-block-button__link:not(.has-background) {
background-color: ' . $storefront_theme_mods['button_background_color'] . ';
}
.wp-block-button:not(.has-background) .wp-block-button__link:hover,
.wp-block-button:not(.has-background) .wp-block-button__link:focus,
.wp-block-button:not(.has-background) .wp-block-button__link:active {
.wp-block-button__link:not(.has-background):hover,
.wp-block-button__link:not(.has-background):focus,
.wp-block-button__link:not(.has-background):active {
border-color: ' . storefront_adjust_color_brightness( $storefront_theme_mods['button_background_color'], $darken_factor ) . ';
background-color: ' . storefront_adjust_color_brightness( $storefront_theme_mods['button_background_color'], $darken_factor ) . ';
}
.wp-block-quote footer,
.wp-block-quote cite {
.wp-block-quote cite,
.wp-block-quote__citation {
color: ' . $storefront_theme_mods['text_color'] . ';
}
.wp-block-pullquote cite,
.wp-block-pullquote footer,
.wp-block-pullquote__citation {
color: ' . $storefront_theme_mods['text_color'] . ';
}
@ -870,16 +873,17 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
color: ' . $storefront_theme_mods['heading_color'] . ';
}
.wp-block-file .wp-block-file__button {
.wp-block-file a.wp-block-file__button {
color: ' . $storefront_theme_mods['button_text_color'] . ';
background-color: ' . $storefront_theme_mods['button_background_color'] . ';
border-color: ' . $storefront_theme_mods['button_background_color'] . ';
}
.wp-block-file .wp-block-file__button:hover, .wp-block-file .wp-block-file__button:focus, .wp-block-file .wp-block-file__button:active {
.wp-block-file a.wp-block-file__button:hover,
.wp-block-file a.wp-block-file__button:focus,
.wp-block-file a.wp-block-file__button:active {
color: ' . $storefront_theme_mods['button_text_color'] . ';
background-color: ' . storefront_adjust_color_brightness( $storefront_theme_mods['button_background_color'], $darken_factor ) . ';
background-color: ' . storefront_adjust_color_brightness( $storefront_theme_mods['button_background_color'], $darken_factor ) . ';
}
.wp-block-code,