diff --git a/includes/blocks/class-kadence-blocks-column-block.php b/includes/blocks/class-kadence-blocks-column-block.php index e9656fe19..9f2198782 100644 --- a/includes/blocks/class-kadence-blocks-column-block.php +++ b/includes/blocks/class-kadence-blocks-column-block.php @@ -102,6 +102,22 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) { $css->set_selector( '.kadence-column' . $unique_id . ' > .kt-inside-inner-col' ); $css->add_property( 'height', '100%' ); } + if ( isset( $attributes['flexGrow'][1] ) && $css->is_number( $attributes['flexGrow'][1] ) ) { + $css->set_media_state( 'tablet' ); + $css->set_selector( '.kadence-column' . $unique_id . ', .wp-block-kadence-column.kb-section-dir-horizontal > .kt-inside-inner-col > .kadence-column' . $unique_id ); + $css->add_property( 'flex-grow', $attributes['flexGrow'][1] ); + $css->set_selector( '.kadence-column' . $unique_id . ' > .kt-inside-inner-col' ); + $css->add_property( 'height', '100%' ); + $css->set_media_state( 'desktop' ); + } + if ( isset( $attributes['flexGrow'][2] ) && $css->is_number( $attributes['flexGrow'][2] ) ) { + $css->set_media_state( 'mobile' ); + $css->set_selector( '.kadence-column' . $unique_id . ', .wp-block-kadence-column.kb-section-dir-horizontal > .kt-inside-inner-col > .kadence-column' . $unique_id ); + $css->add_property( 'flex-grow', $attributes['flexGrow'][2] ); + $css->set_selector( '.kadence-column' . $unique_id . ' > .kt-inside-inner-col' ); + $css->add_property( 'height', '100%' ); + $css->set_media_state( 'desktop' ); + } if ( ! empty( $attributes['maxWidth'][0] ) ) { $css->set_selector( '.kadence-column' . $unique_id ); $css->add_property( 'max-width', $attributes['maxWidth'][0] . $max_width_unit ); @@ -677,6 +693,10 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) { if ( ( 'horizontal' === $desktop_direction || 'horizontal-reverse' === $desktop_direction ) ) { $css->add_property( 'flex-wrap', 'nowrap' ); } + if ( ( 'horizontal' === $desktop_direction || 'horizontal-reverse' === $desktop_direction ) ) { + $css->set_selector( '.wp-block-kadence-column.kb-section-dir-horizontal.kadence-column' . $unique_id . ' > .kt-inside-inner-col > *' ); + $css->add_property( 'flex', 'unset' ); + } if ( ( 'horizontal' === $desktop_direction || 'horizontal-reverse' === $desktop_direction ) && ! empty( $attributes['flexBasis'][0] ) ) { $css->set_selector( '.wp-block-kadence-column.kb-section-dir-horizontal.kadence-column' . $unique_id . ' > .kt-inside-inner-col > *' ); $css->add_property( 'flex', '1' ); diff --git a/kadence-blocks.php b/kadence-blocks.php index 4b14c4ff6..4f0f9d74b 100644 --- a/kadence-blocks.php +++ b/kadence-blocks.php @@ -5,7 +5,7 @@ * Description: Advanced Page Building Blocks for Gutenberg. Create custom column layouts, backgrounds, dual buttons, icons etc. * Author: Kadence WP * Author URI: https://www.kadencewp.com - * Version: 3.2.47 + * Version: 3.2.48 * Requires PHP: 7.4 * Text Domain: kadence-blocks * License: GPL2+ @@ -20,7 +20,7 @@ } define( 'KADENCE_BLOCKS_PATH', realpath( plugin_dir_path( __FILE__ ) ) . DIRECTORY_SEPARATOR ); define( 'KADENCE_BLOCKS_URL', plugin_dir_url( __FILE__ ) ); -define( 'KADENCE_BLOCKS_VERSION', '3.2.47' ); +define( 'KADENCE_BLOCKS_VERSION', '3.2.48' ); require_once plugin_dir_path( __FILE__ ) . 'vendor/vendor-prefixed/autoload.php'; require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; diff --git a/readme.txt b/readme.txt index 36aedc4e3..89e68e57e 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: gutenberg, blocks, page builder, editor, gutenberg blocks Donate link: https://www.kadencewp.com/about-us/ Requires at least: 6.3 Tested up to: 6.5 -Stable tag: 3.2.47 +Stable tag: 3.2.48 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -174,9 +174,14 @@ Please report security bugs found in the Kadence Blocks plugin's source code thr == Changelog == += 3.2.48 = +Release Date: June 27th 2024 +* Fix: Issue with vertical alignment in tablet for sections. +* Fix: Issue with css priority of flex in sections. + = 3.2.47 = Release Date: June 27th 2024 -Update: WPML config. +* Update: WPML config. * Fix: Possible issue with editor react error 311. * Fix: Gallery image control buttons. diff --git a/src/blocks/column/edit.js b/src/blocks/column/edit.js index ea32f52b8..e43c48fab 100644 --- a/src/blocks/column/edit.js +++ b/src/blocks/column/edit.js @@ -1697,8 +1697,8 @@ function SectionEdit(props) { { let tempValue = value; if ((verticalAlignment ? verticalAlignment : '') === value) { @@ -1734,8 +1734,8 @@ function SectionEdit(props) { { let tempValue = value; if ((verticalAlignment ? verticalAlignment : '') === value) {