Skip to content

Commit 92efe9a

Browse files
mcokervalorkin
authored andcommitted
fix(popover/tooltip): use translate for relative offset positioning for tooltip and popover arrows (#4850)
fixes #4849
1 parent 8c3cb31 commit 92efe9a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/popover/popover-container.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import { isBs3 } from 'ngx-bootstrap/utils';
1717
`
1818
:host.bs-popover-top .arrow, :host.bs-popover-bottom .arrow {
1919
left: 50%;
20-
margin-left: -8px;
20+
transform: translateX(-50%);
2121
}
2222
:host.bs-popover-left .arrow, :host.bs-popover-right .arrow {
2323
top: 50%;
24-
margin-top: -8px;
24+
transform: translateY(-50%);
2525
}
2626
`
2727
],

src/tooltip/tooltip-container.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ import { isBs3 } from 'ngx-bootstrap/utils';
2525
}
2626
:host.bs-tooltip-top .arrow, :host.bs-tooltip-bottom .arrow {
2727
left: 50%;
28-
margin-left: -6px;
28+
transform: translateX(-50%);
2929
}
3030
:host.bs-tooltip-left .arrow, :host.bs-tooltip-right .arrow {
3131
top: 50%;
32-
margin-top: -6px;
32+
transform: translateY(-50%);
3333
}
3434
`
3535
],

0 commit comments

Comments
 (0)