Skip to content

Commit

Permalink
Rolling back using the gap CSS var as a fallback since the CSS var ca…
Browse files Browse the repository at this point in the history
…n theoretically be something like "24px 54px" or some other manifestation of the shorthand value.
  • Loading branch information
ramonjd committed Mar 21, 2022
1 parent 765ca94 commit b618d4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 )';
Expand Down

0 comments on commit b618d4e

Please sign in to comment.