| @@ -8,9 +8,9 @@ | ||
| 8 | 8 | use Elementor\Core\Base\Document; |
| 9 | 9 | use Elementor\Modules\PageTemplates\Module as PageTemplatesModule; |
| 10 | 10 | |
| 11 | 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | - exit; // Exit if accessed directly. | |
| 12 | + exit; // Exit if accessed directly | |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | class Settings_Layout extends Tab_Base { |
| 16 | 16 | |
| @@ -115,9 +115,12 @@ | ||
| 115 | 115 | 'row' => '20', |
| 116 | 116 | 'column' => '20', |
| 117 | 117 | ], |
| 118 | 118 | 'description' => esc_html__( 'Sets the default space between widgets (Default: 20px)', 'elementor' ), |
| 119 | - 'selectors' => $this->get_spacing_selectors(), | |
| 119 | + 'selectors' => [ | |
| 120 | + '.elementor-widget:not(:last-child)' => 'margin-block-end: {{ROW}}{{UNIT}}', | |
| 121 | + '.elementor-element' => '--widgets-spacing: {{ROW}}{{UNIT}} {{COLUMN}}{{UNIT}}', | |
| 122 | + ], | |
| 120 | 123 | 'conversion_map' => [ |
| 121 | 124 | 'old_key' => 'size', |
| 122 | 125 | 'new_key' => 'column', |
| 123 | 126 | ], |
| @@ -240,20 +243,8 @@ | ||
| 240 | 243 | $this->add_control( 'viewport_md', [ 'type' => Controls_Manager::HIDDEN ] ); |
| 241 | 244 | $this->add_control( 'viewport_lg', [ 'type' => Controls_Manager::HIDDEN ] ); |
| 242 | 245 | |
| 243 | 246 | $this->end_controls_section(); |
| 244 | - } | |
| 245 | - | |
| 246 | - private function get_spacing_selectors(): array { | |
| 247 | - $optimized_markup = Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ); | |
| 248 | - $sections_widget_spacing = $optimized_markup | |
| 249 | - ? '--kit-widget-spacing: {{ROW}}{{UNIT}}' | |
| 250 | - : 'margin-block-end: {{ROW}}{{UNIT}}'; | |
| 251 | - | |
| 252 | - return [ | |
| 253 | - '.elementor-widget:not(:last-child)' => $sections_widget_spacing, | |
| 254 | - '.elementor-element' => '--widgets-spacing: {{ROW}}{{UNIT}} {{COLUMN}}{{UNIT}};--widgets-spacing-row: {{ROW}}{{UNIT}};--widgets-spacing-column: {{COLUMN}}{{UNIT}};', | |
| 255 | - ]; | |
| 256 | 247 | } |
| 257 | 248 | |
| 258 | 249 | /** |
| 259 | 250 | * Before Save |