From 2b403819b7faa07e9849885cd6ae672774e38553 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Fri, 12 May 2017 16:08:51 +0200 Subject: [PATCH] Fix tooltip margin to be stick at their caller --- scss/_tooltip.scss | 5 +---- scss/_variables.scss | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/scss/_tooltip.scss b/scss/_tooltip.scss index d67dc4460a..4eaaa1c58f 100644 --- a/scss/_tooltip.scss +++ b/scss/_tooltip.scss @@ -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(); @@ -15,7 +16,6 @@ &.bs-tooltip-top { padding: $tooltip-arrow-width 0; - margin-top: -$tooltip-margin; .arrow::before { bottom: 0; @@ -28,7 +28,6 @@ } &.bs-tooltip-right { padding: 0 $tooltip-arrow-width; - margin-left: $tooltip-margin; .arrow::before { top: 50%; @@ -41,7 +40,6 @@ } &.bs-tooltip-bottom { padding: $tooltip-arrow-width 0; - margin-top: $tooltip-margin; .arrow::before { top: 0; @@ -54,7 +52,6 @@ } &.bs-tooltip-left { padding: 0 $tooltip-arrow-width; - margin-left: -$tooltip-margin; .arrow::before { top: 50%; diff --git a/scss/_variables.scss b/scss/_variables.scss index fccee460bf..1bcabdc472 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -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;