Skip to content

Commit 01fec82

Browse files
committed
Update Latest-Posts-Hover.php
1 parent 48dacc7 commit 01fec82

1 file changed

Lines changed: 60 additions & 2 deletions

File tree

widgets/Latest-Posts-Hover.php

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,64 @@ protected function _register_controls()
401401
],
402402
]
403403
);
404-
404+
$this->add_control(
405+
'text_color_active',
406+
[
407+
'label' => esc_html__('Color text active', 'Latest-Posts-Hover'),
408+
'type' => \Elementor\Controls_Manager::COLOR,
409+
'default' => 'black',
410+
'selectors' => [
411+
'{{WRAPPER}} .category-filter-button.active' => ' color: {{VALUE}} !important;',
412+
],
413+
]
414+
);
415+
$this->add_control(
416+
'background_color_active',
417+
[
418+
'label' => esc_html__('Background color active', 'Latest-Posts-Hover'),
419+
'type' => \Elementor\Controls_Manager::COLOR,
420+
'default' => 'black',
421+
'selectors' => [
422+
'{{WRAPPER}} .category-filter-button.active' => ' background-color: {{VALUE}};',
423+
],
424+
]
425+
);
426+
$this->add_control(
427+
'background_color_inactive',
428+
[
429+
'label' => esc_html__('Background color inactive', 'Latest-Posts-Hover'),
430+
'type' => \Elementor\Controls_Manager::COLOR,
431+
'default' => 'black',
432+
'selectors' => [
433+
'{{WRAPPER}} .category-filter-button' => ' background-color: {{VALUE}};',
434+
],
435+
]
436+
);
437+
$this->add_control(
438+
'Text_inactive_bold',
439+
[
440+
'label' => esc_html__('Text inactive Bold', 'Latest-Posts-Hover'),
441+
'type' => \Elementor\Controls_Manager::SWITCHER,
442+
'label_on' => esc_html__('On', 'Latest-Posts-Hover'),
443+
'label_off' => esc_html__('Off', 'Latest-Posts-Hover'),
444+
'return_value' => 'bold',
445+
'default' => 'normal',
446+
'selectors' => [
447+
'{{WRAPPER}} .category-filter-button' => 'font-weight: {{VALUE}};',
448+
],
449+
]
450+
);
451+
$this->add_control(
452+
'background_color_hover',
453+
[
454+
'label' => esc_html__('Background color hover', 'Latest-Posts-Hover'),
455+
'type' => \Elementor\Controls_Manager::COLOR,
456+
'default' => 'black',
457+
'selectors' => [
458+
'{{WRAPPER}} .category-filter-button:hover' => ' background-color: {{VALUE}};',
459+
],
460+
]
461+
);
405462
$this->end_controls_section();
406463
}
407464
protected function render()
@@ -578,10 +635,11 @@ protected function render()
578635
margin: 10px;
579636
cursor: pointer;
580637
transition: background-color 0.3s ease;
638+
font-weight: normal;
581639
}
582640
583641
.category-filter-button:hover {
584-
background-color: green;
642+
background-color: green !important;
585643
}
586644
.category-filter-button.active {
587645
background-color: red;

0 commit comments

Comments
 (0)