Skip to content

Commit

Permalink
KAD-3933 update for inherited custom gaps
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbert-hernandez committed Dec 31, 2024
1 parent a3e5a62 commit 87a98d0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion includes/blocks/class-kadence-blocks-row-layout-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,15 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
}
$css->set_media_state( 'desktop' );
}

// Update $attributes if there are custom gaps that need to be inherited.
if ( ! empty( $attributes['columnGutter'] ) ) {
if ( empty( $attributes['tabletGutter'] ) ) {
$attributes['tabletGutter'] = $attributes['columnGutter'];
}
if ( empty( $attributes['mobileGutter'] ) ) {
$attributes['mobileGutter'] = $attributes['tabletGutter'];
}
}
//Tablet layout
if ( empty( $attributes['tabletLayout'] ) && ! empty( $css->render_row_gap_property( $attributes, array( 'columnGutter', 'tabletGutter', 'mobileGutter' ), 'tablet', 'customGutter', 'gutterType' ) ) ) {
//no tablet layout, but we have a tablet guttter width, so render the inherited column layout from desktop, potentially with custom widths.
Expand Down

0 comments on commit 87a98d0

Please sign in to comment.