Skip to content

Commit

Permalink
Fix tooltip margin to be stick at their caller
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed May 14, 2017
1 parent cc455c1 commit 2b40381
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions scss/_tooltip.scss
Expand Up @@ -3,6 +3,7 @@
position: absolute;
z-index: $zindex-tooltip;
display: block;
margin: $tooltip-margin;
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
// So reset our font and text properties to avoid inheriting weird values.
@include reset-text();
Expand All @@ -15,7 +16,6 @@

&.bs-tooltip-top {
padding: $tooltip-arrow-width 0;
margin-top: -$tooltip-margin;

.arrow::before {
bottom: 0;
Expand All @@ -28,7 +28,6 @@
}
&.bs-tooltip-right {
padding: 0 $tooltip-arrow-width;
margin-left: $tooltip-margin;

.arrow::before {
top: 50%;
Expand All @@ -41,7 +40,6 @@
}
&.bs-tooltip-bottom {
padding: $tooltip-arrow-width 0;
margin-top: $tooltip-margin;

.arrow::before {
top: 0;
Expand All @@ -54,7 +52,6 @@
}
&.bs-tooltip-left {
padding: 0 $tooltip-arrow-width;
margin-left: -$tooltip-margin;

.arrow::before {
top: 50%;
Expand Down
2 changes: 1 addition & 1 deletion scss/_variables.scss
Expand Up @@ -696,7 +696,7 @@ $tooltip-bg: $black !default;
$tooltip-opacity: .9 !default;
$tooltip-padding-y: 3px !default;
$tooltip-padding-x: 8px !default;
$tooltip-margin: 3px !default;
$tooltip-margin: 0 !default;

$tooltip-arrow-width: 5px !default;
$tooltip-arrow-color: $tooltip-bg !default;
Expand Down

0 comments on commit 2b40381

Please sign in to comment.