Skip to content

Commit

Permalink
fix: add more selectors for Advanced Heading (#2301)
Browse files Browse the repository at this point in the history
Adds more selectors to make sure the Heading block works better with more
themes as some themes and Core has some styles that prevent the default
styles from working.

Closes #2299
  • Loading branch information
HardeepAsrani authored Aug 2, 2024
1 parent b1407ab commit 0eef0ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/blocks/blocks/advanced-heading/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ span.wp-block-themeisle-blocks-advanced-heading {
display: block;
}

.wp-block-themeisle-blocks-advanced-heading {
.wp-block-themeisle-blocks-advanced-heading,
.is-layout-constrained > :is( .wp-block-themeisle-blocks-advanced-heading, .wp-block-themeisle-blocks-advanced-heading:first-child ), /* We add these selectors to make sure the block is styled correctly. FSE themes not making things much easier. */
:is(h1, h2, h3, h4, h5, h6).wp-block-themeisle-blocks-advanced-heading {
--padding: 0px;
--padding-tablet: var(--padding);
--padding-mobile: var(--padding-tablet);
Expand Down

0 comments on commit 0eef0ae

Please sign in to comment.