From cd2d82150cc27c1f81d2394a22efbf2dbec0e7be Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 28 Jun 2012 21:46:45 -0700 Subject: standardize top level file comments --- less/tooltip.less | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'less/tooltip.less') diff --git a/less/tooltip.less b/less/tooltip.less index 5111a193f..8593e2b5f 100644 --- a/less/tooltip.less +++ b/less/tooltip.less @@ -1,5 +1,7 @@ -// TOOLTIP -// ------= +// +// Tooltips +// -------------------------------------------------- + .tooltip { position: absolute; -- cgit v1.2.3 From 64e87a85f5e17e3cf603b97e21d58b077060e7b2 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 9 Jul 2012 22:14:30 -0700 Subject: remove popoverarrows mixin, relegate code to tooltips and popvers since we only used them once each; this fixes the problem of broken tooltips in 2.1 --- less/tooltip.less | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) (limited to 'less/tooltip.less') diff --git a/less/tooltip.less b/less/tooltip.less index 8593e2b5f..89143deca 100644 --- a/less/tooltip.less +++ b/less/tooltip.less @@ -3,6 +3,7 @@ // -------------------------------------------------- +// Base class .tooltip { position: absolute; z-index: @zindexTooltip; @@ -12,15 +13,13 @@ font-size: 11px; .opacity(0); &.in { .opacity(80); } - &.top { margin-top: -2px; } - &.right { margin-left: 2px; } - &.bottom { margin-top: 2px; } - &.left { margin-left: -2px; } - &.top .tooltip-arrow { #popoverArrow > .top(); } - &.left .tooltip-arrow { #popoverArrow > .left(); } - &.bottom .tooltip-arrow { #popoverArrow > .bottom(); } - &.right .tooltip-arrow { #popoverArrow > .right(); } + &.top { margin-top: -3px; } + &.right { margin-left: 3px; } + &.bottom { margin-top: 3px; } + &.left { margin-left: -3px; } } + +// Wrapper for the tooltip content .tooltip-inner { max-width: 200px; padding: 3px 8px; @@ -30,8 +29,42 @@ background-color: @black; .border-radius(4px); } + +// Arrows .tooltip-arrow { position: absolute; width: 0; height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip { + &.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -@tooltipArrowWidth; + border-width: @tooltipArrowWidth @tooltipArrowWidth 0; + border-top-color: @tooltipArrowColor; + } + &.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -@tooltipArrowWidth; + border-width: @tooltipArrowWidth @tooltipArrowWidth @tooltipArrowWidth 0; + border-right-color: @tooltipArrowColor; + } + &.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -@tooltipArrowWidth; + border-width: @tooltipArrowWidth 0 @tooltipArrowWidth @tooltipArrowWidth; + border-left-color: @tooltipArrowColor; + } + &.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -@tooltipArrowWidth; + border-width: 0 @tooltipArrowWidth @tooltipArrowWidth; + border-bottom-color: @tooltipArrowColor; + } } -- cgit v1.2.3 From a750551feee3a70005327fb1ec9318629c4f1f29 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 10 Jul 2012 00:36:21 -0700 Subject: add vars for tooltip customization via background and color --- less/tooltip.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/tooltip.less') diff --git a/less/tooltip.less b/less/tooltip.less index 89143deca..fba1856f5 100644 --- a/less/tooltip.less +++ b/less/tooltip.less @@ -23,10 +23,10 @@ .tooltip-inner { max-width: 200px; padding: 3px 8px; - color: @white; + color: @tooltipColor; text-align: center; text-decoration: none; - background-color: @black; + background-color: @tooltipBackground; .border-radius(4px); } -- cgit v1.2.3