-
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
Fix/18582 z index for snackbar #18690
Conversation
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.
Thank you so much for the pull request 🎉
While it does seem to address the issue specifically, I left some comments to suggest we might need a different approach. Best I can tell the way you solved it here was to forcibly remove the horizontal scrollbar and change the z-index to be above any such scrollbars. But while I agree horizontal scrollbars are the worst (:D) every once in a while they are intentional, so we can't hide those.
All the snackbars are inside a container though, that you may be able to target instead, such as components-snackbar-list
.
Thanks again for the PR!
@@ -24,6 +24,7 @@ $z-layers: ( | |||
".block-editor-warning": 5, | |||
".block-library-gallery-item__inline-menu": 20, | |||
".block-editor-url-input__suggestions": 30, | |||
".edit-post-layout__content": 35, |
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.
If the goal is to fix the snackbar position, I would consider changing the z-index of components-snackbar-list
rather than the content container itself. It might have adverse effects otherwise.
Unfortunately this particular classname also changed in a recent refactor in #18044, so it no longer exists in master
.
@@ -12,6 +12,11 @@ | |||
} | |||
} | |||
|
|||
|
|||
.edit-post-layout__content { | |||
overflow-x: hidden; |
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.
I don't think we should add this. While we haven't seen it yet, there may be cases where you need to be able to scroll horizontally in the layout content. Most of the time the horizontal scrollbar is helpful to discover accidental horizontal scrollbars, i.e. when content is too wide, but you could even imagine a horizontally scrolling theme! :) https://wordpress.com/theme/shelf
I think this is already fixed in master, right? |
I am closing this PR. As the issue has been fixed. |
Thanks @ajotka for giving this a try! In trunk I see the footer set to z-index |
This PR is from 2019 and you fixed it in different branch a long time ago, but never closed it ;) Thanks! |
Description
Fix #18582 for Snackbar notices. It was showing up under the footer and under the horizontal scrollbar.
How has this been tested?
Tested locally, by manual tests.
Wordpress 5.3.0.
Steps:
I:
II:
Screenshots
Types of changes
Checklist: