@@ -638,11 +638,30 @@ public function register_scripts() {
638638 return ;
639639 }
640640 wp_register_style ( 'kadence-blocks- ' . $ this ->block_name , false );
641- $ heading_css = '.wp-block-kadence-advancedheading mark{background:transparent;border-style:solid;border-width:0}.wp-block-kadence-advancedheading mark.kt-highlight{color:#f76a0c;}.kb-adv-heading-icon{display: inline-flex;justify-content: center;align-items: center;} .is-layout-constrained > .kb-advanced-heading-link {display: block;} ' ;
641+ $ heading_css = <<<'CSS'
642+ .wp-block-kadence-advancedheading mark{background:transparent;border-style:solid;border-width:0}
643+ .wp-block-kadence-advancedheading mark.kt-highlight{color:#f76a0c;}
644+ .kb-adv-heading-icon{display: inline-flex;justify-content: center;align-items: center;}
645+ .is-layout-constrained > .kb-advanced-heading-link {display: block;}
646+ CSS;
647+
648+ // Style to prevent padding conflict with WordPress core style for headings and paragraphs.
649+ // Reference: https://stellarwp.atlassian.net/browse/KAD-5283
650+ $ heading_css .= '.wp-block-kadence-advancedheading.has-background{padding: 0;} ' ;
651+
642652 // Short term fix for an issue with heading wrapping.
643653 if ( class_exists ( '\Kadence\Theme ' ) ) {
644- $ heading_css .= '.single-content .kadence-advanced-heading-wrapper h1, .single-content .kadence-advanced-heading-wrapper h2, .single-content .kadence-advanced-heading-wrapper h3, .single-content .kadence-advanced-heading-wrapper h4, .single-content .kadence-advanced-heading-wrapper h5, .single-content .kadence-advanced-heading-wrapper h6 {margin: 1.5em 0 .5em;}.single-content .kadence-advanced-heading-wrapper+* { margin-top:0;} ' ;
654+ $ heading_css .= <<<'CSS'
655+ .single-content .kadence-advanced-heading-wrapper h1,
656+ .single-content .kadence-advanced-heading-wrapper h2,
657+ .single-content .kadence-advanced-heading-wrapper h3,
658+ .single-content .kadence-advanced-heading-wrapper h4,
659+ .single-content .kadence-advanced-heading-wrapper h5,
660+ .single-content .kadence-advanced-heading-wrapper h6 {margin: 1.5em 0 .5em;}
661+ .single-content .kadence-advanced-heading-wrapper+* { margin-top:0;}
662+ CSS;
645663 }
664+
646665 // Add screen reader text styles
647666 $ heading_css .= '.kb-screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);} ' ;
648667 wp_add_inline_style ( 'kadence-blocks- ' . $ this ->block_name , $ heading_css );
0 commit comments