-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Change z-index override logic for popovers. #17696
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.
theme(button) 72% | ||
); | ||
background-image: | ||
linear-gradient(-45deg, theme(button) 28%, color(theme(button) shade(20%)) 28%, color(theme(button) shade(20%)) 72%, theme(button) 72%); |
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.
Any reason for this change other than personal preference?
Gradients always give me headaches, and although it's not really a coding pattern to split on to multiple lines, when actually working on these gradients and tweaking them, it really helps that they're on multiple lines. I'd prefer the old version unless there's a good reason to change this.
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.
Oooh interesting. Stylelint changed that automatically so I guess the /* stylelint-disable */
comment above is being ignored for some reason. I'll revert that as it's unrelated to this changset 😛
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.
Done, thanks for the review @jasmussen !
383d3ee
to
6e48ccf
Compare
* Change z-index override logic for popovers. * Undo gradient formatting. * Remove import of deleted file. * Remove empty file, fix reference to deleted zindex
Description
New popovers in the sidebar won't display on mobile because of their z-index. This fixes that issue.
Found this issue while working on #17418 - turns out that
:not(.is-mobile)
actually targets all mobile instances of Dropdown/Popover unless they are also set toexpandOnMobile
.The rule I'm removing was originally added to stop popovers at the top of the page from hiding the wp-admin bar dropdowns, but it is too general so over time a bunch of overrides for it have been added.
My change removes that rule and the overrides, and instead adds specific rules to keep the z-index of the top-of-the-page popovers under wp-admin dropdowns.
Steps to test
Open editor on desktop. Click to open block inserter, table of contents, or block navigation in the top toolbar, then hover over "+ New" on wp-admin bar so that the dropdown appears. Verify that the wp-admin dropdown is displaying over the popover from the editor toolbar.
Open editor on mobile. Select a text block and open settings bar for the block. Go to "Color settings"; clicking on "custom color" should bring up a popover.
How has this been tested?
Checked all the popovers I could find in the editor, on desktop and (emulated) mobile. Triple-checked the ones I added or removed specific rules for.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: