-
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
Popover: Ensure popovers consider border width's in their positioning. #23035
Conversation
…r accounts for the boderwidth.
Size Change: +1 B Total Size: 1.13 MB
ℹ️ View Unchanged
|
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.
Beautiful. Thanks for this.
To me it seems to work as intended, and it's a vast improvement over what's shipping.
2x:
1x:
As far as I can tell, there isn't any subpixel positioning going on, only abs positioning:
This might still align to the wrong pixel in cases of course, but it should align to the wrong whole pixel at least.
Furthermore, I believe that might be improved by #22640
Agreed. I think this is good to go as is. |
Currently, popovers are displayed 1px off the grid. This causes them to not line up with things like the block toolbar. Here's how it looks in
master
currently:If you look closely, you'll notice that the left side of the popover is 1px off to the right from the left side of the toolbar.
This PR adjusts the margins of the popover component to use the grid SCSS variable and adds in the
$border-width
variable to account for the width of the borders. It ends up looking like this: