2016-10-26 10:03:16 +08:00
|
|
|
@tooltip-prefix-cls: ~"@{css-prefix}tooltip";
|
2016-10-26 11:45:00 +08:00
|
|
|
@tooltip-arrow: ~"@{tooltip-prefix-cls}-arrow";
|
2016-10-26 10:03:16 +08:00
|
|
|
@tooltip-max-width: 250px;
|
|
|
|
@tooltip-arrow-width: 5px;
|
|
|
|
@tooltip-distance: @tooltip-arrow-width - 1 + 4;
|
|
|
|
|
|
|
|
.@{tooltip-prefix-cls} {
|
|
|
|
display: inline-block;
|
|
|
|
|
2016-10-26 11:45:00 +08:00
|
|
|
&-rel{
|
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2016-10-26 10:03:16 +08:00
|
|
|
&-popper{
|
|
|
|
display: block;
|
|
|
|
visibility: visible;
|
|
|
|
font-size: @font-size-small;
|
|
|
|
line-height: @line-height-base;
|
|
|
|
position: absolute;
|
|
|
|
z-index: @zindex-tooltip;
|
2016-10-26 11:45:00 +08:00
|
|
|
|
|
|
|
&[x-placement^="top"] {
|
|
|
|
padding: @tooltip-arrow-width 0 @tooltip-distance 0;
|
|
|
|
}
|
|
|
|
&[x-placement^="right"] {
|
|
|
|
padding: 0 @tooltip-arrow-width 0 @tooltip-distance;
|
|
|
|
}
|
|
|
|
&[x-placement^="bottom"] {
|
|
|
|
padding: @tooltip-distance 0 @tooltip-arrow-width 0;
|
|
|
|
}
|
|
|
|
&[x-placement^="left"] {
|
|
|
|
padding: 0 @tooltip-distance 0 @tooltip-arrow-width;
|
|
|
|
}
|
|
|
|
|
|
|
|
&[x-placement^="top"] .@{tooltip-arrow} {
|
|
|
|
bottom: @tooltip-distance - @tooltip-arrow-width;
|
|
|
|
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
|
|
|
|
border-top-color: @tooltip-bg;
|
|
|
|
}
|
|
|
|
&[x-placement="top"] .@{tooltip-arrow} {
|
|
|
|
left: 50%;
|
|
|
|
margin-left: -@tooltip-arrow-width;
|
|
|
|
}
|
|
|
|
&[x-placement="top-start"] .@{tooltip-arrow} {
|
|
|
|
left: 16px;
|
|
|
|
}
|
|
|
|
&[x-placement="top-end"] .@{tooltip-arrow} {
|
|
|
|
right: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&[x-placement^="right"] .@{tooltip-arrow} {
|
|
|
|
left: @tooltip-distance - @tooltip-arrow-width;
|
|
|
|
border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
|
|
|
|
border-right-color: @tooltip-bg;
|
|
|
|
}
|
|
|
|
&[x-placement="right"] .@{tooltip-arrow} {
|
|
|
|
top: 50%;
|
|
|
|
margin-top: -@tooltip-arrow-width;
|
|
|
|
}
|
|
|
|
&[x-placement="right-start"] .@{tooltip-arrow} {
|
|
|
|
top: 8px;
|
|
|
|
}
|
|
|
|
&[x-placement="right-end"] .@{tooltip-arrow} {
|
|
|
|
bottom: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&[x-placement^="left"] .@{tooltip-arrow} {
|
|
|
|
right: @tooltip-distance - @tooltip-arrow-width;
|
|
|
|
border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
|
|
|
|
border-left-color: @tooltip-bg;
|
|
|
|
}
|
|
|
|
&[x-placement="left"] .@{tooltip-arrow} {
|
|
|
|
top: 50%;
|
|
|
|
margin-top: -@tooltip-arrow-width;
|
|
|
|
}
|
|
|
|
&[x-placement="left-start"] .@{tooltip-arrow} {
|
|
|
|
top: 8px;
|
|
|
|
}
|
|
|
|
&[x-placement="left-end"] .@{tooltip-arrow} {
|
|
|
|
bottom: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&[x-placement^="bottom"] .@{tooltip-arrow} {
|
|
|
|
top: @tooltip-distance - @tooltip-arrow-width;
|
|
|
|
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
|
|
|
|
border-bottom-color: @tooltip-bg;
|
|
|
|
}
|
|
|
|
&[x-placement="bottom"] .@{tooltip-arrow} {
|
|
|
|
left: 50%;
|
|
|
|
margin-left: -@tooltip-arrow-width;
|
|
|
|
}
|
|
|
|
&[x-placement="bottom-start"] .@{tooltip-arrow} {
|
|
|
|
left: 16px;
|
|
|
|
}
|
|
|
|
&[x-placement="bottom-end"] .@{tooltip-arrow} {
|
|
|
|
right: 16px;
|
|
|
|
}
|
2016-10-26 10:03:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-inner{
|
|
|
|
max-width: @tooltip-max-width;
|
|
|
|
min-height: 34px;
|
|
|
|
padding: 8px 10px;
|
|
|
|
color: @tooltip-color;
|
|
|
|
text-align: left;
|
|
|
|
text-decoration: none;
|
|
|
|
background-color: @tooltip-bg;
|
|
|
|
border-radius: @border-radius-small;
|
|
|
|
box-shadow: @shadow-base;
|
2016-10-26 13:51:05 +08:00
|
|
|
white-space:nowrap;
|
2016-10-26 10:03:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-arrow{
|
|
|
|
position: absolute;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
border-color: transparent;
|
|
|
|
border-style: solid;
|
|
|
|
}
|
|
|
|
}
|