Skip to content

Commit

Permalink
Clear aspect-ratio if minHeight is set on the site frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Jan 18, 2024
1 parent 051bb7f commit ef7149d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/block-supports/dimensions.php
Expand Up @@ -103,6 +103,11 @@ function gutenberg_render_dimensions_support( $block_content, $block ) {
isset( $dimensions_block_styles['aspectRatio'] )
) {
$dimensions_block_styles['minHeight'] = 'unset';
} elseif (
isset( $block_attributes['style']['dimensions']['minHeight'] ) ||
isset( $block_attributes['minHeight'] )
) {
$dimensions_block_styles['aspectRatio'] = 'unset';
}

$styles = gutenberg_style_engine_get_styles( array( 'dimensions' => $dimensions_block_styles ) );
Expand Down

0 comments on commit ef7149d

Please sign in to comment.