From 9ab57adad2bcddbc025420e3343a83dcfc0cac15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Thu, 30 Jul 2020 18:58:18 +0200 Subject: [PATCH 1/2] Fix link color style property name --- lib/global-styles.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/global-styles.php b/lib/global-styles.php index 60c2b15c03696..0e5161a3757a9 100644 --- a/lib/global-styles.php +++ b/lib/global-styles.php @@ -270,13 +270,13 @@ function gutenberg_experimental_global_styles_get_theme() { */ function gutenberg_experimental_global_styles_get_supported_styles( $supports ) { $style_features = array( - 'color' => array( '__experimentalColor' ), - 'background-color' => array( '__experimentalColor' ), - 'background' => array( '__experimentalColor', 'gradients' ), - 'link-color' => array( '__experimentalColor', 'linkColor' ), - 'line-height' => array( '__experimentalLineHeight' ), - 'font-size' => array( '__experimentalFontSize' ), - 'block-align' => array( 'align' ), + '--wp--style--color--link' => array( '__experimentalColor', 'linkColor' ), + 'background-color' => array( '__experimentalColor' ), + 'background' => array( '__experimentalColor', 'gradients' ), + 'block-align' => array( 'align' ), + 'color' => array( '__experimentalColor' ), + 'font-size' => array( '__experimentalFontSize' ), + 'line-height' => array( '__experimentalLineHeight' ), ); $supported_features = array(); From 91d20c78fb3f1624e4d4f8dd1d3b32a4c171cc3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Sun, 2 Aug 2020 17:48:28 +0200 Subject: [PATCH 2/2] Update prop name used to check support --- lib/blocks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/blocks.php b/lib/blocks.php index a618da90590db..e2298c33ca9a5 100644 --- a/lib/blocks.php +++ b/lib/blocks.php @@ -320,7 +320,7 @@ function gutenberg_experimental_build_css_colors( $attributes, $block_attributes } // Link Colors. - if ( in_array( 'link-color', $supports, true ) ) { + if ( in_array( '--wp--style--color--link', $supports, true ) ) { $has_link_color = isset( $block_attributes['style']['color']['link'] ); // Apply required class and style. if ( $has_link_color ) {