From b618d4e6100e82561a2bb503d3ade0d193351828 Mon Sep 17 00:00:00 2001 From: ramonjd Date: Thu, 17 Mar 2022 10:52:07 +1100 Subject: [PATCH] Rolling back using the gap CSS var as a fallback since the CSS var can theoretically be something like "24px 54px" or some other manifestation of the shorthand value. --- lib/block-supports/layout.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index 00127d6dea67ae..c2f988592f1d02 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -95,8 +95,8 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support $style .= 'display: flex;'; if ( $has_block_gap_support ) { if ( is_array( $gap_value ) ) { - $gap_row = isset( $gap_value['top'] ) ? $gap_value['top'] : 'var( --wp--style--block-gap, 0.5em )'; - $gap_column = isset( $gap_value['left'] ) ? $gap_value['left'] : 'var( --wp--style--block-gap, 0.5em )'; + $gap_row = isset( $gap_value['top'] ) ? $gap_value['top'] : '0.5em'; + $gap_column = isset( $gap_value['left'] ) ? $gap_value['left'] : '0.5em'; $gap_value = $gap_row === $gap_column ? $gap_row : $gap_row . ' ' . $gap_column; } $gap_style = $gap_value ? $gap_value : 'var( --wp--style--block-gap, 0.5em )';