start_controls_section( 'section_spacer', [ 'label' => esc_html__( 'Spacer', 'elementor' ), ] ); $this->add_responsive_control( 'space', [ 'label' => esc_html__( 'Space', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 50, ], 'size_units' => [ 'px', 'em', 'rem', 'vh', 'custom' ], 'range' => [ 'px' => [ 'max' => 600, ], 'em' => [ 'max' => 20, ], ], 'render_type' => 'template', 'selectors' => [ '{{WRAPPER}}' => '--spacer-size: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); } /** * Render spacer widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); if ( empty( $settings['space'] ) || empty( $settings['space']['size'] ) || 0 === $settings['space']['size'] ) { return; } ?>