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

Creator: Fix padding in editor #422

Closed
wants to merge 3 commits into from
Closed

Conversation

StevenDufresne
Copy link
Collaborator

@StevenDufresne StevenDufresne commented Mar 3, 2022

Introducing Twenty Twenty styles into the editor in #417 created some small regressions.

  • The padding around the content in the editor is gone
  • The first "block" jumps upwards after first interaction.

This is the result of the Twenty Twenty theme overriding margin and padding on some of Gutenberg's classic.scss styles.

These styles are meant to be a fallback for themes that currently don't use theme.json layouts. See comment in css file for more information.

Current Solution

Copy the Gutenberg styles to our stylesheet.

Alternate Approaches

Re-arrange CSS imports, move Gutenberg after Twenty Twenty one

This would most likely introduce other layout issues.

Control Via theme.json

Try this after #420 is merged

Remaining Issues

  • The Block list appender ([+]) still jumps up higher than expected because it's absolutely positioned. In the default editor it isn't noticeable because the title styles are different.

Screenshots

Before After

How to test the changes in this Pull Request:

  1. Go to new-pattern
  2. Expect to see around the content
  3. Resize the window, expect the padding persists.

@StevenDufresne StevenDufresne added the [Component] Pattern Creator Anything related to the pattern front end editor or preview label Mar 3, 2022
@StevenDufresne
Copy link
Collaborator Author

Closing in favor of #428's approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Creator Anything related to the pattern front end editor or preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant