-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Block Styles: Remove the block margin in the style selector #19983
Block Styles: Remove the block margin in the style selector #19983
Conversation
This looks good to me, but I'd like design feedback on it. @jasmussen, do you have thoughts? |
Yeah, this is kind of an unfortunate challenge of this. The preview is literally the block, identical to what it is in the post content. And right now the baseline of margin is just applied to every single block, affecting this preview as well. Which is kind of unfortunate. The thing we want to continue to move towards, is a place where no such baseline margin exists at all, and is instead applied by each block individually. This requires a lighter DOM with fewer React fragments, which Ella is working on. And it's actually coming down the pike. That's a long-winded way of saying: yes, I think it's fine to ship this PR as is (👍 👍) — but also that there's a very high probability that this particular CSS will at some point grow stale/die off and need to be changed. If you need to merge this, then it looks like a good improvement, but please keep an eye on Ella's doing, notably PRs like this one: #19912 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Description
This removes margins on the block preview when used in the styles selector.
This is being added here:
gutenberg/packages/block-library/src/editor.scss
Line 56 in 17e5c2d
but it doesn't make much sense for previews in the block style selector.
How has this been tested?
In chrome
Screenshots
Before:
After:
Types of changes
Bug fix
Checklist: