WordPress 6.9 fixes a specificity issue with the Heading block’s background padding. Previously, padding styles applied to headings with backgrounds were affecting other blocks that use heading elements, such as the Accordion Heading block. This fix ensures that background padding is only applied to actual Heading blocks.

What’s changed?

The CSS selector for applying padding to headings with backgrounds has been made more specific. The selector now targets .wp-block-heading.has-background instead of just heading element tags (h1h2, etc) with the .has-background class.

Before:

h1, h2, h3, h4, h5, h6 { &.has-background { padding: ...; } }

After:

h1, h2, h3, h4, h5, h6 { &:where(.wp-block-heading).has-background {

Click here to continue reading this article.