Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout Styles: Block list appender causes inconsistent application of layout margin styles #61846

Open
aaronrobertshaw opened this issue May 22, 2024 · 0 comments
Labels
[Feature] Layout Layout block support, its UI controls, and style output. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@aaronrobertshaw
Copy link
Contributor

Description

When a block type has margins, defined either through theme.json or global styles, they can be overridden by layout styles e.g. the constrained layout which removes the start and end margins on the first and last child elements respectively.

When the block list appender is inserted within a container with such a layout, the style removing the last child's margin now targets the appender instead of the last block causing a layout shift

Step-by-step reproduction instructions

  1. Navigate to Appearance > Editor > Global Styles > Blocks > Cover
  2. Apply vertical margins to Cover blocks
  3. Add a Cover block within a Group block to a page or post
  4. Note the Group block's default constrained layout removes the Cover block's margins
  5. Select the Group block and see the bottom margin suddenly applied

Screenshots, screen recording, code snippet

Screen.Recording.2024-05-22.at.4.50.11.PM.mp4

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@aaronrobertshaw aaronrobertshaw added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Feature] Layout Layout block support, its UI controls, and style output. labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Layout Layout block support, its UI controls, and style output. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: 📥 Todo
Development

No branches or pull requests

1 participant