diff --git a/seedlet/inc/wpcom-colors.php b/seedlet/inc/wpcom-colors.php index 014260ce7..dbf36c6da 100644 --- a/seedlet/inc/wpcom-colors.php +++ b/seedlet/inc/wpcom-colors.php @@ -450,7 +450,8 @@ add_color_rule( 'fg2', '#FAFBF6', array( ), __( 'Tertiary Color' ) ); /** - * Custom CSS + * Custom CSS. + * The plugin takes the body of this function and applies it in a style tag in the document head. */ function seedlet_custom_colors_extra_css() { $colors_array = get_theme_mod( 'colors_manager' ); diff --git a/seedlet/inc/wpcom-customize-preview.js b/seedlet/inc/wpcom-customize-preview.js index 4920de844..5a2f9b31f 100755 --- a/seedlet/inc/wpcom-customize-preview.js +++ b/seedlet/inc/wpcom-customize-preview.js @@ -18,8 +18,8 @@ } ); } ); - // The wpcom colors plugin does not handle live updates of extra CSS. - // This function provides the CSS updates via JavaScript. + // Since the plugin handles customizer preview updates via the postMessage transport, + // we need to manually override the "extra CSS" when a user selects a different color palette. wp.customize( 'colors_manager[colors]', function( value ) { value.bind( function( to ) { const { bg, fg1, fg2 } = to; diff --git a/seedlet/inc/wpcom-editor-colors.php b/seedlet/inc/wpcom-editor-colors.php index fbed98411..bcaa805ec 100644 --- a/seedlet/inc/wpcom-editor-colors.php +++ b/seedlet/inc/wpcom-editor-colors.php @@ -221,6 +221,7 @@ add_color_rule( 'fg2', '#FAFBF6', array( /** * Custom CSS + * The plugin takes the body of this function and applies it in a style tag in the document head. */ function seedlet_custom_colors_extra_css() { $colors_array = get_theme_mod( 'colors_manager' );