insomnia/app/ui/css/components/tooltip.less

58 lines
1.1 KiB
Plaintext
Raw Normal View History

@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;
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;
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;
}
&.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;
}
&.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;
}
}