-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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 popover arrow computations #23110
Conversation
@@ -57,18 +58,17 @@ | |||
|
|||
.arrow::before, | |||
.arrow::after { | |||
top: 100%; |
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.
Please do not use any CSS for the position of our arrow, the arrow position is managed by Popper.js not our CSS
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.
popper.js manages .arrow
not .arrow:before
and .arrow:after
.
So it's safe to position these pseudo-elements.
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.
Remove any css rules which manage the arrow position please
You're right @wojtask9 maybe you can add a Codepen to show your work
default border-width border width 3px; Sadly I see bug with popover with header. |
You can change that line : https://github.com/twbs/bootstrap/blob/v4-dev/js/src/tooltip.js#L103 |
But then additional html markup is required (not hard because only template must be modified) |
scss/_popover.scss
Outdated
width: 20px; | ||
margin-left: -10px; | ||
|
||
.popover-header:not(:empty) + .arrow:after { |
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.
Begin pseudo elements with double colons: ::
I've changed updated codepen: |
also artifacts on on certain zoom level could be solved. |
No we don't handle browser zooming |
Hi |
@NielsHolt |
#23936 better fix |
Current
border
of popover arrow can be only 1px.This PR takes into account popover border too.
You can play with arrow border here: http://www.cssarrowplease.com/
Also this PR fixes white arrow background with popover-header
before:
after: