Skip to content

Commit

Permalink
KAD-3232 adv buttons focus match hover
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbert-hernandez committed Aug 15, 2024
1 parent 4860b7f commit 353ed11
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 241 deletions.
8 changes: 4 additions & 4 deletions includes/blocks/class-kadence-blocks-singlebtn-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
}
$css->render_measure_output( $attributes, 'iconPadding', 'padding', array( 'unit_key' => 'iconPaddingUnit' ) );
$css->render_responsive_range( $attributes, 'iconSize', 'font-size', 'iconSizeUnit' );
// Icon Hover.
$css->set_selector( '.kb-btn' . $unique_id . '.kb-button:hover .kb-svg-icon-wrap' );
// Icon Hover-Focus.
$css->set_selector( '.kb-btn' . $unique_id . '.kb-button:hover .kb-svg-icon-wrap, .kb-btn' . $unique_id . '.kb-button:focus .kb-svg-icon-wrap' );
if ( ! empty( $attributes['iconColorHover'] ) ) {
$css->add_property( 'color', $css->render_color( $attributes['iconColorHover'] ) );
}
// Hover.
$css->set_selector( '.wp-block-kadence-advancedbtn .kb-btn' . $unique_id . '.kb-button:hover' );
// Hover-Focus.
$css->set_selector( '.wp-block-kadence-advancedbtn .kb-btn' . $unique_id . '.kb-button:hover, .wp-block-kadence-advancedbtn .kb-btn' . $unique_id . '.kb-button:focus' );
if ( ! empty( $attributes['colorHover'] ) ) {
$css->add_property( 'color', $css->render_color( $attributes['colorHover'] ) );
}
Expand Down
Loading

0 comments on commit 353ed11

Please sign in to comment.