diff --git a/lib/class-wp-theme-json.php b/lib/class-wp-theme-json.php index 7bc78826fae240..a99e6f8106debf 100644 --- a/lib/class-wp-theme-json.php +++ b/lib/class-wp-theme-json.php @@ -1026,6 +1026,14 @@ private function get_block_styles() { unset( $declarations[ $index ] ); } + if ( '--wp--style--color--link' === $property['name'] ) { + $block_rules .= self::to_ruleset( + $selector . ':not([class*=has-link-color])', + array( $property ) + ); + unset( $declarations[ $index ] ); + } + if ( 'font-size' === $property['name'] ) { $block_rules .= self::to_ruleset( $selector . ':not([class*=-font-size])',