fix popover arrow computations and .arrow position#23936
fix popover arrow computations and .arrow position#23936wojtask9 wants to merge 1 commit intotwbs:v4-devfrom
Conversation
| // Arrows | ||
| // | ||
| // .arrow is outer, .arrow::after is inner | ||
| // .arrow:before is outer, .arrow::after is inner |
|
Hi @wojtask9 and @vsn4ik I have created tree demo to illustrate: Could you please have a look at them and let me hear what you think :-) |
|
@NielsHolt From In your PR you didn't take this into account and Also In my PR (as you shown) there are issues but I believe these are issues in |
|
Passing on this given recent changes to popovers using rems from another PR. I'd be happy to see another PR that addresses scaling the arrow borders with the popover's border width, but I don't see any advantage in the rest of these changes here. Thanks though! |
This fix is based on #23820 but it also fixes 'corner cases' from #23846
According to comment #23846 (comment) "The arrow element should have the same width of the actual space used by the arrow to properly get positioned" and "Note that the correct width is needed to position the arrow properly, and the margins are used to always ensure some spacing between the arrow and the popover's edge".
Also this PR fixes white arrow background with popover-header.
Note that 'old' solution is not valid anymore because
.arrowposition is managed bypopper.jsso it must be relative to.arrowbefore:

after:

Notes:
.popoverborder larger than 1px.remis very easy.calc()can be removed if border and width use the same units.popoveruse border-radius.