2017-03-28 22:45:23 +00:00
|
|
|
@import '../constants/dimensions';
|
|
|
|
|
|
|
|
.tooltip {
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
opacity: 0.8;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tooltip__bubble {
|
2017-03-29 02:21:49 +00:00
|
|
|
position: absolute;
|
2017-03-28 22:45:23 +00:00
|
|
|
left: -999999px;
|
|
|
|
opacity: 0;
|
|
|
|
background: var(--color-bg);
|
|
|
|
border: 1px solid var(--color-bg);
|
|
|
|
box-shadow: 0 0 1em rgba(0, 0, 0, 0.1);
|
|
|
|
color: var(--color-font);
|
|
|
|
padding: @padding-xs @padding-sm;
|
|
|
|
border-radius: @radius-sm;
|
|
|
|
font-size: @font-size-sm;
|
2017-03-29 02:21:49 +00:00
|
|
|
width: 18rem;
|
|
|
|
text-align: center;
|
2017-03-29 23:09:28 +00:00
|
|
|
z-index: 10;
|
|
|
|
white-space: normal !important;
|
2017-03-29 02:21:49 +00:00
|
|
|
|
|
|
|
// If this isn't like this, weird things happen like making the parent scroll
|
|
|
|
height: 0;
|
|
|
|
line-height: 0;
|
2017-03-28 22:45:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.tooltip--visible .tooltip__bubble {
|
|
|
|
opacity: 1;
|
|
|
|
transition: opacity 200ms;
|
2017-03-29 02:21:49 +00:00
|
|
|
|
|
|
|
// Back to normal
|
|
|
|
height: auto;
|
|
|
|
line-height: normal;
|
2017-03-28 22:45:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.tooltip--left .tooltip__bubble {
|
|
|
|
margin-right: @padding-xs;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.tooltip--right .tooltip__bubble {
|
|
|
|
margin-left: @padding-xs;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.tooltip--top .tooltip__bubble {
|
|
|
|
margin-bottom: @padding-xs;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tooltip--bottom .tooltip__bubble {
|
|
|
|
margin-top: @padding-xs;
|
|
|
|
}
|
|
|
|
}
|