You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
3.7 KiB

@import "../mixins/index";
9 years ago
@tooltip-prefix-cls: ~"@{css-prefix}tooltip";
//
// Tooltips
// --------------------------------------------------
//** Tooltip max width
9 years ago
@tooltip-max-width: 250px;
//** Tooltip text color
9 years ago
@tooltip-color: #fff;
//** Tooltip background color
9 years ago
@tooltip-bg: #373737;
@tooltip-opacity: 0.9;
//** Tooltip arrow width
9 years ago
@tooltip-arrow-width: 5px;
//** Tooltip distance with trigger
9 years ago
@tooltip-distance: @tooltip-arrow-width + 4;
//** Tooltip arrow color
9 years ago
@tooltip-arrow-color: @tooltip-bg;
// Base class
.@{tooltip-prefix-cls} {
position: absolute;
z-index: 1070;
display: block;
visibility: visible;
9 years ago
// remove left/top by yiminghe
// left: -9999px;
// top: -9999px;
font-size: @font-size-base;
line-height: @line-height-base;
opacity: @tooltip-opacity;
10 years ago
&-hidden {
display: none;
}
&-placement-top,
&-placement-topLeft,
&-placement-topRight {
9 years ago
padding: @tooltip-arrow-width 0 @tooltip-distance 0;
}
&-placement-right,
&-placement-rightTop,
&-placement-rightBottom {
9 years ago
padding: 0 @tooltip-arrow-width 0 @tooltip-distance;
}
&-placement-bottom,
&-placement-bottomLeft,
&-placement-bottomRight {
9 years ago
padding: @tooltip-distance 0 @tooltip-arrow-width 0;
}
&-placement-left,
&-placement-leftTop,
&-placement-leftBottom {
9 years ago
padding: 0 @tooltip-distance 0 @tooltip-arrow-width;
}
}
// Wrapper for the tooltip content
.@{tooltip-prefix-cls}-inner {
max-width: @tooltip-max-width;
padding: 8px 10px;
color: @tooltip-color;
text-align: left;
text-decoration: none;
background-color: @tooltip-bg;
border-radius: @border-radius-base;
box-shadow: @overlay-shadow;
min-height: 34px;
}
// Arrows
.@{tooltip-prefix-cls}-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.@{tooltip-prefix-cls} {
9 years ago
&-placement-top &-arrow,
&-placement-topLeft &-arrow,
&-placement-topRight &-arrow {
bottom: @tooltip-distance - @tooltip-arrow-width;
margin-left: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
}
9 years ago
&-placement-top &-arrow {
left: 50%;
}
&-placement-topLeft &-arrow {
left: 15%;
}
&-placement-topRight &-arrow {
right: 15%;
}
&-placement-right &-arrow,
&-placement-rightTop &-arrow,
&-placement-rightBottom &-arrow {
left: @tooltip-distance - @tooltip-arrow-width;
margin-top: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
border-right-color: @tooltip-arrow-color;
}
9 years ago
&-placement-right &-arrow {
top: 50%;
9 years ago
}
&-placement-rightTop &-arrow {
top: 15%;
margin-top: 0;
}
&-placement-rightBottom &-arrow {
bottom: 15%;
}
&-placement-left &-arrow,
&-placement-leftTop &-arrow,
&-placement-leftBottom &-arrow {
right: @tooltip-distance - @tooltip-arrow-width;
margin-top: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
border-left-color: @tooltip-arrow-color;
}
9 years ago
&-placement-left &-arrow {
top: 50%;
}
&-placement-leftTop &-arrow {
top: 15%;
margin-top: 0;
}
&-placement-leftBottom &-arrow {
bottom: 15%;
}
&-placement-bottom &-arrow,
&-placement-bottomLeft &-arrow,
&-placement-bottomRight &-arrow {
top: @tooltip-distance - @tooltip-arrow-width;
margin-left: -@tooltip-arrow-width;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
}
9 years ago
&-placement-bottom &-arrow {
left: 50%;
}
&-placement-bottomLeft &-arrow {
left: 15%;
}
&-placement-bottomRight &-arrow {
right: 15%;
}
}