Skip to content

Commit

Permalink
TMZ-96 hero comments 2nd round
Browse files Browse the repository at this point in the history
  • Loading branch information
mserino committed Oct 29, 2024
1 parent 2178d40 commit 9d787db
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions modules/content/widgets/hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -775,24 +775,11 @@ protected function add_style_box_section() {
]
);

$this->add_responsive_control(
'style_box_padding',
[
'label' => esc_html__( 'Padding', 'hello-plus' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em', 'rem' ],
'selectors' => [
'{{WRAPPER}} .ehp-hero' => '--hero-box-padding-block-end: {{BOTTOM}}{{UNIT}}; --hero-box-padding-block-start: {{TOP}}{{UNIT}}; --hero-box-padding-inline-end: {{RIGHT}}{{UNIT}}; --hero-box-padding-inline-start: {{LEFT}}{{UNIT}};',
],
]
);

$this->add_control(
'box_background_label',
[
'label' => esc_html__( 'Background', 'hello-plus' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);

Expand All @@ -803,7 +790,31 @@ protected function add_style_box_section() {
'types' => [ 'classic', 'gradient' ],
'exclude' => [ 'image' ],
'selector' => '{{WRAPPER}} .ehp-hero',
'fields_options' => [
'background' => [
'default' => 'classic',
],
],
]
);

$this->add_responsive_control(
'style_box_padding',
[
'label' => esc_html__( 'Padding', 'hello-plus' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em', 'rem' ],
'selectors' => [
'{{WRAPPER}} .ehp-hero' => '--hero-box-padding-block-end: {{BOTTOM}}{{UNIT}}; --hero-box-padding-block-start: {{TOP}}{{UNIT}}; --hero-box-padding-inline-end: {{RIGHT}}{{UNIT}}; --hero-box-padding-inline-start: {{LEFT}}{{UNIT}};',
],
'default' => [
'top' => 60,
'right' => 0,
'bottom' => 0,
'left' => 0,
'unit' => 'px',
],
'separator' => 'before',
]
);

Expand Down

0 comments on commit 9d787db

Please sign in to comment.