Skip to content

Commit

Permalink
Merge pull request #617 from stellarwp/bugfix/KAD-3784
Browse files Browse the repository at this point in the history
bugfix/KAD-3784
  • Loading branch information
oakesjosh authored Nov 25, 2024
2 parents 564ebd5 + 35620a3 commit 2a4a72e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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 @@ -401,7 +401,7 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
$css->add_property( 'margin-left', $media_style['margin'][3] . 'px' );
}
}
if ( isset( $media_style['borderRadius'] ) && ! empty( $media_style['borderRadius'] ) ) {
if ( isset( $media_style['borderRadius'] ) && ! empty( $media_style['borderRadius'] ) && isset( $media_style['padding'] ) && is_array( $media_style['padding'] ) && ! empty( array_filter( $media_style['padding'], fn($value) => $value > 0 ) ) ) {
$css->set_selector( $base_selector . ' .kt-blocks-info-box-media .kadence-info-box-image-intrisic img' );
$css->add_property( 'border-radius', $media_style['borderRadius'] . 'px' );
}
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/infobox/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ function KadenceInfoBox(props) {
mediaIcon[0].hoverColor
)} !important; }`
: ''}
{mediaStyle[0].borderRadius
{mediaStyle[0].borderRadius && mediaStyle[0].padding.some((number) => number > 0)
? `.kb-info-box-wrap${uniqueID} .kt-blocks-info-box-link-wrap .kt-blocks-info-box-media .kadence-info-box-image-intrisic img, .kb-info-box-wrap${uniqueID} .kt-blocks-info-box-link-wrap .kt-blocks-info-box-media .block-editor-media-placeholder { border-radius: ${mediaStyle[0].borderRadius}px !important; }`
: ''}
{titleHoverColor
Expand Down

0 comments on commit 2a4a72e

Please sign in to comment.