-
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
Sidebar panels added by plugins may inherit styles from WordPress that should be reset #8616
Comments
Interesting indeed. I'd love to get rid of both relative positionings, but I also feel like there's a reason they're there. Do "modern" sidebar metaboxes get these CSS classed wrappers as well, or is it only "legacy" metaboxes? I haven't been deep into the code for a while so I can't recall the details. Would an added If we can't remove the position relative, plan B might be to expand the region-focus-outline outwards instead of inwards, which wouldn't be as nice but could solve it. CC: @youknowriad because I recall you working on these classnames. |
I don't have any specific context to add at first sight. I don't recall any particular reason for the relative positioning. |
Worth noting this happens only in combination with #8554 because it uses I've just noticed that hovering the "Revisions" panels produces the same effect: This happens because the "Revisions" panels (specifically the link icon-button within it) gets a white background only when hovered. So I've checked the panel added by the plugin and it does have a white background (set on the Seems the easier fix would be resetting these backgrounds? |
Hmm that's interesting — simply removing the background there does seem to fix the issue. But I wonder why that is? Would any other CSS properties cause it to shift upwards like that? |
Well the background is set on a children of the element with outline, and the children has a higher stack index. That is. Box-shadow works differently. |
Right, but I'm wondering what makes the |
@afercia is this issue still present? I'm don't seen the hover issue with the Revisions panel anymore. |
Noticed while working on #8554 /Cc @jasmussen
Seems that sidebar panels added by plugin may inherit (depending on their implementation) styles from WordPress that could lead to unexpected results.
For example, when using the
Ctrl + backtick
keyboard shortcut to navigate through the main regions, the focus style applied around the sidebar may look wrong:See the last sidebar panel that overlaps the focus style. This specific panel uses some markup from the WordPress meta boxes. After a quick investigation, seems two
position: relative
CSS declarations are responsible for this:from Gutenberg:
from WordPress
Potentially, there could be other inherited CSS rules that could produce unexpected results. Soem special care should be taken in overriding these rules for the panels in the sidebar.
The text was updated successfully, but these errors were encountered: