-
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
Cancel left margin when full width block appender used at root level of layout #33087
Conversation
@jasmussen I'd really appreciate your 👀 on this one as I expect there are a number of test scenarios I'll need to run through to ensure this change doesn't introduce any regressions. |
Thanks for the PR. I'm still investigating why the margin is there in the first place. It's also present, but cancelled out, in the block editor when inserting a Group block: I feel like it's there for a reason, and if not, we can remove it entirely. But I'll dig a little deeper and get back to this one! |
This comment has been minimized.
This comment has been minimized.
Okay, so here's why the left margin is there: so it has to have an explicit left margin that isn't "auto", in order to work inside flex containers: But obviously when the big white plus button is used, that margin is useless. Let me look at whether there's a better way to cancel out that margin. The thing is, I'd like to remove that in-canvas inserter entirely, in favor of something that's abs-positioned/popovered, for some of the reasons outlined in #31886. So I'd love to find CSS that doesn't assume that black plus will exist forever, instead of overriding it. |
We really need a way to distinguish between the "plus" appended and the full width one. |
Yep, I'm looking into that now. I think there's an opportunity for a refactor, also in context of #33025, but let's find a small fix in the mean time. I shall return in a bit. |
I have #33088 as an alternate fix. |
Closing in favour of #33088 |
Description
This PR ensures that when a full width block appended is used at the root level of the block list then it doesn't have any left margin applied to it.
It looks like we've been tinkering with the block appended margins quite a bit so it's obviously a thorny area.
This fixes #33085
How has this been tested?
I don't have a high degree of confidence in the test scenarios I'll need to run through but here's a start:
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).