2015-07-13 07:59:38 +08:00
|
|
|
@sliderClass: ~"@{css-prefix}slider";
|
|
|
|
|
2015-07-14 12:07:04 +08:00
|
|
|
// slider color
|
2015-07-13 07:59:38 +08:00
|
|
|
@disabledColor: #ccc;
|
2015-07-14 12:07:04 +08:00
|
|
|
// tooltip
|
|
|
|
@tooltip-color: #fff;
|
|
|
|
@tooltip-bg: tint(#666, 4%);
|
|
|
|
@tooltip-arrow-width: 4px;
|
|
|
|
@tooltip-distance: @tooltip-arrow-width+4;
|
|
|
|
@tooltip-arrow-color: @tooltip-bg;
|
2015-07-13 07:59:38 +08:00
|
|
|
|
|
|
|
.@{sliderClass} {
|
|
|
|
position: relative;
|
2015-07-14 12:07:04 +08:00
|
|
|
margin: 12px 0;
|
2015-07-13 07:59:38 +08:00
|
|
|
height: 4px;
|
|
|
|
width: 100%;
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
background-color: #e9e9e9;
|
|
|
|
|
|
|
|
&-track {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
height: 4px;
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
background-color: tint(@primary-color, 60%);
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-handle {
|
|
|
|
position: absolute;
|
|
|
|
margin-left: -7px;
|
|
|
|
margin-top: -5px;
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
cursor: pointer;
|
|
|
|
border-radius: 50%;
|
|
|
|
border: solid 2px tint(@primary-color, 50%);
|
|
|
|
background-color: #fff;
|
|
|
|
z-index: 2;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
border-color: tint(@primary-color, 20%);
|
|
|
|
}
|
|
|
|
&-active {
|
|
|
|
&:active {
|
|
|
|
border-color: tint(@primary-color, 20%);
|
|
|
|
box-shadow: 0 0 5px tint(@primary-color, 20%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-mark {
|
|
|
|
position: absolute;
|
2015-07-14 12:07:04 +08:00
|
|
|
top: 10px;
|
2015-07-13 07:59:38 +08:00
|
|
|
left: 0px;
|
|
|
|
width: 100%;
|
|
|
|
font-size: 12px;
|
|
|
|
z-index: 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-mark-text {
|
|
|
|
position: absolute;
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
text-align: center;
|
|
|
|
cursor: pointer;
|
|
|
|
color: #999;
|
|
|
|
|
|
|
|
&-active {
|
|
|
|
color: #666;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-step {
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 4px;
|
|
|
|
background: transparent;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-dot {
|
|
|
|
position: absolute;
|
|
|
|
top: -2px;
|
|
|
|
margin-left: -4px;
|
|
|
|
width: 8px;
|
|
|
|
height: 8px;
|
|
|
|
border: 2px solid #e9e9e9;
|
|
|
|
background-color: #fff;
|
|
|
|
cursor: pointer;
|
|
|
|
border-radius: 50%;
|
|
|
|
vertical-align: middle;
|
|
|
|
&:first-child {
|
|
|
|
margin-left: -4px;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
margin-left: -4px;
|
|
|
|
}
|
|
|
|
&-active {
|
|
|
|
border-color: tint(@primary-color, 50%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-disabled {
|
2015-07-14 12:07:04 +08:00
|
|
|
background-color: #e9e9e9;
|
2015-07-13 07:59:38 +08:00
|
|
|
|
|
|
|
.@{sliderClass}-track {
|
|
|
|
background-color: @disabledColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{sliderClass}-handle {
|
|
|
|
border-color: @disabledColor;
|
|
|
|
background-color: #fff;
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{sliderClass}-mark-text, .dot {
|
|
|
|
cursor: not-allowed!important;
|
|
|
|
}
|
|
|
|
}
|
2015-07-14 12:07:04 +08:00
|
|
|
|
|
|
|
// slider tooltip style
|
|
|
|
&-tooltip {
|
|
|
|
position: absolute;
|
|
|
|
left: -9999px;
|
|
|
|
top: -9999px;
|
|
|
|
z-index: 4;
|
|
|
|
visibility: visible;
|
|
|
|
|
|
|
|
&-hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-placement-top {
|
|
|
|
padding: @tooltip-arrow-width 0 @tooltip-distance 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-inner {
|
|
|
|
padding: 6px 0;
|
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
font-size: @font-size-base;
|
|
|
|
line-height: 1;
|
|
|
|
color: @tooltip-color;
|
|
|
|
text-align: center;
|
|
|
|
text-decoration: none;
|
|
|
|
background-color: @tooltip-bg;
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
box-shadow: 0 0 4px #d9d9d9;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-arrow {
|
|
|
|
position: absolute;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
border-color: transparent;
|
|
|
|
border-style: solid;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-placement-top &-arrow {
|
|
|
|
bottom: @tooltip-distance - @tooltip-arrow-width;
|
|
|
|
left: 50%;
|
|
|
|
margin-left: -@tooltip-arrow-width;
|
|
|
|
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
|
|
|
|
border-top-color: @tooltip-arrow-color;
|
|
|
|
}
|
|
|
|
}
|
2015-07-13 07:59:38 +08:00
|
|
|
}
|