diff --git a/lib/block-supports/border.php b/lib/block-supports/border.php index b81f7c8e2bbb0..9953f7fe2fefb 100644 --- a/lib/block-supports/border.php +++ b/lib/block-supports/border.php @@ -190,10 +190,9 @@ function gutenberg_generate_individual_border_classes_and_styles( $side, $border if ( $border_color && ! $should_skip_color_serialization ) { $has_color_preset = strpos( $border_color, 'var:preset|color|' ) !== false; - if ( $has_color_preset ) { $named_color_slug = substr( $border_color, strrpos( $border_color, '|' ) + 1 ); - $styles [] = sprintf( 'border-%s-color: var(--wp--preset--color--%s);', $side, $named_color_slug ); + $styles [] = sprintf( 'border-%s-color: var(--wp--preset--color--%s);', $side, $named_color_slug ); } else { $styles [] = sprintf( 'border-%s-color: %s;', $side, $border['color'] ); }