set_style_id( 'kb-' . $this->block_name . $unique_style_id ); /* * This if is needed for icons blocks that created before blocks 3.0 that * haven't been updated to use single-icon innerBlocks. */ if ( ! empty( $attributes['icons'] ) && is_array( $attributes['icons'] ) ) { foreach ( $attributes['icons'] as $icon_key => $icon_value ) { if ( is_array( $icon_value ) ) { $css->set_selector( '.kt-svg-icons' . $unique_id . ' .kt-svg-item-' . $icon_key . ' .kb-svg-icon-wrap' ); $css->render_color_output( $icon_value, 'color', 'color' ); $css->render_responsive_size( $icon_value, array( 'size', 'tabletSize', 'mobileSize' ), 'font-size' ); if ( isset( $icon_value['style'] ) && 'stacked' === $icon_value['style'] ) { $css->render_color_output( $icon_value, 'background', 'background' ); $css->render_color_output( $icon_value, 'border', 'border-color' ); $css->render_range( $icon_value, 'borderWidth', 'border-width' ); $css->render_range( $icon_value, 'borderRadius', 'border-radius' ); $css->render_measure_output( $icon_value, 'padding', 'padding' ); } $css->render_measure_output( $icon_value, 'margin', 'margin' ); // Hover. $css->set_selector( '.kt-svg-icons' . $unique_id . ' .kt-svg-item-' . $icon_key . ':hover .kb-svg-icon-wrap' ); $css->render_color_output( $icon_value, 'hColor', 'color' ); $css->render_color_output( $icon_value, 'hBackground', 'background' ); $css->render_color_output( $icon_value, 'hBorder', 'border-color' ); } } } $css->set_selector( '.wp-block-kadence-icon.kt-svg-icons' . $unique_id ); $align_args = array( 'desktop_key' => 'textAlignment', 'tablet_key' => 'tabletTextAlignment', 'mobile_key' => 'mobileTextAlignment', ); $css->render_flex_align( $attributes, 'textAlignment', $align_args ); if( isset($attributes['wrapIcons'] ) && $attributes['wrapIcons'] ) { $css->add_property('flex-wrap', 'wrap'); } $css->render_gap( $attributes ); return $css->css_output(); } } Kadence_Blocks_Icon_Block::get_instance();