grafana/public/sass/components/_tooltip.scss

119 lines
2.1 KiB
SCSS
Raw Normal View History

2016-02-15 08:27:41 -06:00
//
// Tooltips
// --------------------------------------------------
// Base class
.tooltip {
position: absolute;
2016-02-16 07:39:45 -06:00
z-index: $zindex-tooltip;
2016-02-15 08:27:41 -06:00
display: block;
visibility: visible;
line-height: 1.4;
font-weight: $font-weight-semi-bold;
2016-02-15 08:27:41 -06:00
@include opacity(0);
2018-12-25 13:18:38 -06:00
2017-12-19 09:22:41 -06:00
&.in {
@include opacity(100);
}
2018-12-25 13:18:38 -06:00
2017-12-19 09:22:41 -06:00
&.top {
margin-top: -3px;
padding: 5px 0;
}
2018-12-25 13:18:38 -06:00
2017-12-19 09:22:41 -06:00
&.right {
margin-left: 3px;
padding: 0 5px;
}
2018-12-25 13:18:38 -06:00
2017-12-19 09:22:41 -06:00
&.bottom {
margin-top: 3px;
padding: 5px 0;
}
2018-12-25 13:18:38 -06:00
2017-12-19 09:22:41 -06:00
&.left {
margin-left: -3px;
padding: 0 5px;
}
2016-02-15 08:27:41 -06:00
}
// Wrapper for the tooltip content
.tooltip-inner {
max-width: 400px;
padding: 8px 16px;
padding: 4px 8px;
2016-02-15 08:27:41 -06:00
color: $tooltipColor;
text-align: center;
text-decoration: none;
2016-02-16 07:39:45 -06:00
background-color: $tooltipBackground;
2016-04-12 12:29:31 -05:00
border-radius: 2px;
2016-02-15 08:27:41 -06:00
}
// Arrows
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
2016-02-15 08:27:41 -06:00
.tooltip {
&.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -$tooltipArrowWidth;
border-width: $tooltipArrowWidth $tooltipArrowWidth 0;
border-top-color: $tooltipArrowColor;
}
2018-12-25 13:18:38 -06:00
2016-02-15 08:27:41 -06:00
&.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -$tooltipArrowWidth;
border-width: $tooltipArrowWidth $tooltipArrowWidth $tooltipArrowWidth 0;
border-right-color: $tooltipArrowColor;
}
2018-12-25 13:18:38 -06:00
2016-02-15 08:27:41 -06:00
&.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -$tooltipArrowWidth;
border-width: $tooltipArrowWidth 0 $tooltipArrowWidth $tooltipArrowWidth;
border-left-color: $tooltipArrowColor;
}
2018-12-25 13:18:38 -06:00
2016-02-15 08:27:41 -06:00
&.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -$tooltipArrowWidth;
border-width: 0 $tooltipArrowWidth $tooltipArrowWidth;
border-bottom-color: $tooltipArrowColor;
}
}
.grafana-tooltip {
2017-12-19 09:22:41 -06:00
position: absolute;
2016-02-15 08:27:41 -06:00
top: -1000;
left: 0;
color: $tooltipColor;
padding: 10px;
font-size: 11pt;
2017-12-19 09:22:41 -06:00
font-weight: 200;
2016-02-15 08:27:41 -06:00
background-color: $tooltipBackground;
border-radius: 5px;
z-index: 9999;
max-width: 800px;
max-height: 600px;
overflow: hidden;
line-height: 14px;
2018-12-25 13:18:38 -06:00
2016-02-15 08:27:41 -06:00
a {
color: $tooltipLinkColor;
}
}
.grafana-tip {
padding-left: 5px;
}