Snackbar: CSS fix for positioning in large screens#75364
Snackbar: CSS fix for positioning in large screens#75364im3dabasia wants to merge 1 commit intoWordPress:trunkfrom
CSS fix for positioning in large screens#75364Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
juanfra
left a comment
There was a problem hiding this comment.
Thanks for the PR @im3dabasia! The fix does solve the visible issue, but I think it's working around the problem rather than addressing the root cause.
The snackbar uses position: fixed, so it's positioned relative to the viewport (not the .boot-layout container). Adding right: 0 only on small screens avoids the overlap with the admin sidebar on larger viewports, but it also means the snackbar still doesn't have proper horizontal bounds above that breakpoint.
The pattern we use elsewhere is to set right: 0 unconditionally and then use the editor-left mixin to offset left based on the admin sidebar state. It'd look something like this:
.boot-layout .components-editor-notices__snackbar {
position: fixed;
right: 0;
bottom: 16px;
padding-left: 16px;
padding-right: 16px;
}
@include editor-left(".boot-layout .components-editor-notices__snackbar");
|
Closing as the snackbar is center aligned now after #75294. |
What?
Closes #75350
Fixes the success snackbar positioning on the Fonts screen so it appears above the sidebar instead of behind it when saving via keyboard shortcut.
Why?
When saving font changes using ⌘S / Ctrl+S, the success snackbar is rendered behind the sidebar, making it partially or fully hidden.
How?
Adjusts the snackbar positioning so it is correctly visible on bigger viewports, ensuring it is not overlapped by the sidebar.
Testing Instructions for Keyboard
Screenshots or screencast
Screencast
Screen.Recording.2026-02-10.at.11.37.49.AM.mov
Screenshots