Honor background and font color in the editor (#1317)

* Honor background color in the editor

* Honor font color in the editor for WP 5.4
This commit is contained in:
Albert Juhé Lluveras 2020-04-20 11:50:47 +02:00 committed by GitHub
parent 05cbe8e143
commit aa9200fea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -924,6 +924,10 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
if ( is_admin() ) {
$styles .= '
.editor-styles-wrapper {
background-color: ' . $storefront_theme_mods['background_color'] . ';
}
.editor-styles-wrapper table:not( .has-background ) th {
background-color: ' . storefront_adjust_color_brightness( $storefront_theme_mods['background_color'], -7 ) . ';
}
@ -948,7 +952,10 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
color: ' . $storefront_theme_mods['heading_color'] . ';
}
.editor-styles-wrapper .editor-block-list__block {
/* WP <=5.3 */
.editor-styles-wrapper .editor-block-list__block,
/* WP >=5.4 */
.editor-styles-wrapper .block-editor-block-list__block {
color: ' . $storefront_theme_mods['text_color'] . ';
}