Skip to content

Commit

Permalink
Fix link color style property name in global styles (#24296)
Browse files Browse the repository at this point in the history
* Fix link color style property name

* Update prop name used to check support
  • Loading branch information
nosolosw authored Aug 2, 2020
1 parent 5526d0c commit c1b0553
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
14 changes: 7 additions & 7 deletions lib/global-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c1b0553

Please sign in to comment.