Skip to content

Commit

Permalink
Fix issue with appender jumping when creating a new pattern. (WordPre…
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen authored Mar 6, 2024
1 parent e7fbb4f commit d60c049
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@
// In "constrained" layout containers, the first and last paragraphs have their margins zeroed out.
// In the case of this appender, it needs to apply those same rules to avoid layout shifts.
// Such shifts happen when the bottom margin of the Title block has been set to less than the default 1em margin of paragraphs.
:where(body .is-layout-constrained) & {
:where(body .is-layout-constrained) &,
:where(.wp-site-blocks) & {
> :first-child:first-child {
margin-block-start: 0;
margin-block-end: 0;
}

// Since this particular appender will only ever appear on an entirely empty document, we don't account for last-child.
// Since this appender will only ever appear on an entirely empty document, we don't account for last-child.
// This is also because it will never be the last child, the block inserter that sits in this appender is the last child.
}

// Dropzone.
Expand Down

0 comments on commit d60c049

Please sign in to comment.