PluginProbe
Gutenberg / 17.0.2
Gutenberg v17.0.2
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
← All changes | lib/block-supports/colors.php +1 -10 23.7.0 → 17.0.2 View file →
@@ -105,19 +105,10 @@
105 105 $color_block_styles['background'] = $preset_background_color ? $preset_background_color : $custom_background_color;
106 106 }
107 107
108 108 // Gradients.
109 - // Suppress color.gradient CSS when background.gradient is supported and
110 - // explicitly set. background.php owns CSS generation in that case, and
111 - // emitting the background shorthand here would conflict with it.
112 - $has_background_gradient_support = block_has_support( $block_type, array( 'background', 'gradient' ), false );
113 - $has_background_gradient_value = ! empty( $block_attributes['style']['background']['gradient'] );
114 109
115 - if (
116 - $has_gradients_support &&
117 - ! wp_should_skip_block_supports_serialization( $block_type, 'color', 'gradients' ) &&
118 - ! ( $has_background_gradient_support && $has_background_gradient_value )
119 - ) {
110 + if ( $has_gradients_support && ! wp_should_skip_block_supports_serialization( $block_type, 'color', 'gradients' ) ) {
120 111 $preset_gradient_color = array_key_exists( 'gradient', $block_attributes ) ? "var:preset|gradient|{$block_attributes['gradient']}" : null;
121 112 $custom_gradient_color = $block_attributes['style']['color']['gradient'] ?? null;
122 113 $color_block_styles['gradient'] = $preset_gradient_color ? $preset_gradient_color : $custom_gradient_color;
123 114 }