Title: Heading Block CSS Specificity Fix in WordPress 6.9
Author: Sarah Norris
Published: November 12, 2025

---

 [  ](https://profiles.wordpress.org/mikachan/) [Sarah Norris](https://profiles.wordpress.org/mikachan/)
4:12 pm _on_ November 12, 2025     
Tags: [6-9 ( 87 )](https://make.wordpress.org/core/tag/6-9/),
[CSS ( 10 )](https://make.wordpress.org/core/tag/css/), [dev-notes ( 647 )](https://make.wordpress.org/core/tag/dev-notes/),
[dev-notes-6-9 ( 25 )](https://make.wordpress.org/core/tag/dev-notes-6-9/)   

# Heading Block CSS Specificity Fix in WordPress 6.9

WordPress 6.9 fixes a [specificity issue with the Heading block’s background padding](https://github.com/WordPress/gutenberg/pull/72837).
Previously, padding styles applied to headings with backgrounds were affecting other
blocks that use heading elements, such as the Accordion Heading blockBlock Block
is the abstract term used to describe units of markup that, composed together, form
the content or layout of a webpage using the WordPress editor. The idea combines
concepts of what in the past may have achieved with shortcodes, custom HTML, and
embed discovery into a single consistent API and user experience.. This fix ensures
that background padding is only applied to actual Heading blocks.

### What’s changed?

The CSSCSS Cascading Style Sheets. 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 (`h1`, `h2`, etc) with the `.
has-background` class.

Before:

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

After:

    ```language-css
    h1, h2, h3, h4, h5, h6 {
      &:where(.wp-block-heading).has-background {
        padding: ...;
      }
    }
    ```

The use of `:where()` ensures the CSS specificity remains at 0-1-1, minimizing impact
on existing theme styles. As the CSS specificity remains unchanged, existing theme
styles targeting heading elements should continue to work as expected.

### What does this mean for themes?

If a theme applies the `.has-background` class to heading elements that are not 
Heading blocks (e.g., `<h1 class="page-title has-background">Hello World</h1>`),
these elements will no longer receive the default block background padding. If a
theme relies on this behavior, it will need to be updated to include explicit padding
styles for these elements.

_Props to _[@priethor](https://profiles.wordpress.org/priethor/)_ for reviewing._

[#6-9](https://make.wordpress.org/core/tag/6-9/), [#css](https://make.wordpress.org/core/tag/css/),
[#dev-notes](https://make.wordpress.org/core/tag/dev-notes/), [#dev-notes-6-9](https://make.wordpress.org/core/tag/dev-notes-6-9/)

### Share this:

 * [  Threads ](https://make.wordpress.org/core/2025/11/12/heading-block-css-specificity-fix-in-wordpress-6-9/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/core/2025/11/12/heading-block-css-specificity-fix-in-wordpress-6-9/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/core/2025/11/12/heading-block-css-specificity-fix-in-wordpress-6-9/?share=bluesky)
 * [  X ](https://make.wordpress.org/core/2025/11/12/heading-block-css-specificity-fix-in-wordpress-6-9/?share=x)
 * [  Facebook ](https://make.wordpress.org/core/2025/11/12/heading-block-css-specificity-fix-in-wordpress-6-9/?share=facebook)
 * [  LinkedIn ](https://make.wordpress.org/core/2025/11/12/heading-block-css-specificity-fix-in-wordpress-6-9/?share=linkedin)

# Post navigation

[← Changes to the Interactivity API in WordPress 6.9](https://make.wordpress.org/core/2025/11/12/changes-to-the-interactivity-api-in-wordpress-6-9/)

[Summary, Dev Chat, November 12, 2025 →](https://make.wordpress.org/core/2025/11/12/summary-dev-chat-november-12-2025/)