Skip to content

Commit

Permalink
Merge pull request #533 from stellarwp/bugfix/KAD-3232
Browse files Browse the repository at this point in the history
bugfix/KAD-3232
  • Loading branch information
oakesjosh authored Aug 30, 2024
2 parents 520e57d + 51cf6f3 commit ad4d553
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion includes/blocks/class-kadence-blocks-infobox-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
$css->add_property( 'margin-left', $learn_more_styles['margin'][3] . $learn_more_margin_unit );
}
if ( isset( $learn_more_styles['colorHover'] ) || isset( $learn_more_styles['colorHover'] ) || isset( $learn_more_styles['borderHover'] ) ) {
$css->set_selector( $base_selector . ' .kt-blocks-info-box-link-wrap:hover .kt-blocks-info-box-learnmore' );
$css->set_selector( $base_selector . ' .kt-blocks-info-box-link-wrap:hover .kt-blocks-info-box-learnmore,' . $base_selector . ' .kt-blocks-info-box-link-wrap .kt-blocks-info-box-learnmore:focus' );
if ( isset( $learn_more_styles['colorHover'] ) && ! empty( $learn_more_styles['colorHover'] ) ) {
$css->add_property( 'color', $css->render_color( $learn_more_styles['colorHover'] ) );
}
Expand Down
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
6 changes: 3 additions & 3 deletions includes/blocks/form/class-kadence-blocks-submit-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ 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' . $class_id . '.kb-button:hover .kb-svg-icon-wrap' );
$css->set_selector( '.kb-btn' . $class_id . '.kb-button:hover .kb-svg-icon-wrap, .kb-btn' . $class_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( '.kb-submit-field .kb-btn' . $class_id . '.kb-button:hover' );
$css->set_selector( '.kb-submit-field .kb-btn' . $class_id . '.kb-button:hover, .kb-submit-field .kb-btn' . $class_id . '.kb-button:focus' );
if ( ! empty( $attributes['colorHover'] ) ) {
$css->add_property( 'color', $css->render_color( $attributes['colorHover'] ) );
}
Expand Down Expand Up @@ -194,7 +194,7 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
$css->add_property( 'transition', 'opacity .3s ease-in-out' );
}
if ( 'gradient' === $bg_hover_type && ! empty( $attributes['gradientHover'] ) ) {
$css->set_selector( '.kb-btn' . $class_id . '.kb-button:hover::before' );
$css->set_selector( '.kb-btn' . $class_id . '.kb-button:hover::before, .kb-btn' . $class_id . '.kb-button:focus::before' );
$css->add_property( 'background', $attributes['gradientHover'] );
$css->set_selector( '.kb-btn' . $class_id . '.kb-button::before' );
$css->add_property( 'transition', 'opacity .3s ease-in-out' );
Expand Down
4 changes: 2 additions & 2 deletions src/blocks/advanced-form/fields/submit/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
background:transparent;
//transition: all .3s ease-in-out;
}
.kb-adv-form-submit-button:hover::before {
.kb-adv-form-submit-button:hover::before, .kb-adv-form-submit-button:focus::before {
opacity: 1;
}
.wp-block-kadence-advanced-form-submit .kb-adv-form-submit-button.kt-btn-size-small{
Expand Down Expand Up @@ -98,4 +98,4 @@
width: 1em;
height: 1em;
}
}
}
13 changes: 11 additions & 2 deletions src/blocks/advancedbtn/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
color: var(--global-palette-btn-hover, #FFFFFF);
background: var(--global-palette-btn-bg-hover, #2F2FFC);
}
&:focus {
color: var(--global-palette-btn-hover, #FFFFFF);
background: var(--global-palette-btn-bg-hover, #2F2FFC);
}
}
.kb-button.kb-btn-global-outline {
border: 2px solid var(--global-palette-btn-bg, #3633E1);
Expand All @@ -60,6 +64,11 @@
background: transparent;
color: var(--global-palette-btn-bg-hover, #2F2FFC);
}
&:focus {
border-color: var(--global-palette-btn-bg-hover, #2F2FFC);
background: transparent;
color: var(--global-palette-btn-bg-hover, #2F2FFC);
}
}
.kb-button::before {
position: absolute;
Expand All @@ -73,7 +82,7 @@
background:transparent;
//transition: opacity .3s ease-in-out;
}
.kb-button:hover::before {
.kb-button:hover::before, .kb-button:focus::before{
opacity: 1;
}
.wp-block-kadence-advancedbtn .kb-button.kt-btn-size-small{
Expand Down Expand Up @@ -108,4 +117,4 @@
width: 1em;
height: 1em;
}
}
}

0 comments on commit ad4d553

Please sign in to comment.