You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This makes the .has-background padding more specific to the heading block, rather than to the heading element tags (h1, h2, h3, etc), to prevent it from being applied to other blocks that use heading elements (e.g. the Accordion Heading).
Why?
To prevent these specific styles from being applied to other blocks, and allow other blocks to override padding via theme.json.
How?
Adds the .wp-block-heading class to the existing .has-background padding CSS rule. Also removes a previous fix for the Accordion Heading block that should no longer be required.
Testing Instructions
Insert an Accordion block
Apply a background to an Accordion Heading block
Make sure that there is no additional padding applied in the editor or on the front end when the background color is applied
Add the below theme.json snippet to your theme's theme.json file
Ensure that the padding from theme.json is applied correctly to the Accordion Heading block
What?
Closes #72776
An alternative fix to #72046
This makes the
.has-backgroundpadding more specific to the heading block, rather than to the heading element tags (h1,h2,h3, etc), to prevent it from being applied to other blocks that use heading elements (e.g. the Accordion Heading).Why?
To prevent these specific styles from being applied to other blocks, and allow other blocks to override padding via theme.json.
How?
Adds the
.wp-block-headingclass to the existing.has-backgroundpadding CSS rule. Also removes a previous fix for the Accordion Heading block that should no longer be required.Testing Instructions
Example theme.json snippet:
Screenshots or screencast