mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-19 11:58:41 +08:00
d811ebee5c
* Add new color patterns algorithm * Add color palettes * update other colors * fix gray color * update more tint/shade to colorPalette * new font color * Update doc for new color system * improve doc style
147 lines
3.1 KiB
Plaintext
147 lines
3.1 KiB
Plaintext
@import "../../style/themes/default";
|
|
@import "../../style/mixins/index";
|
|
|
|
@slider-prefix-cls: ~"@{ant-prefix}-slider";
|
|
// slider color
|
|
@slider-disabled-color: @disabled-color;
|
|
// tooltip
|
|
@slider-tooltip-color: #fff;
|
|
@slider-tooltip-bg: tint(@text-color, 4%);
|
|
@slider-tooltip-arrow-width: 4px;
|
|
@slider-tooltip-distance: @slider-tooltip-arrow-width + 4;
|
|
@slider-tooltip-arrow-color: @slider-tooltip-bg;
|
|
|
|
.@{slider-prefix-cls} {
|
|
position: relative;
|
|
margin: 10px 6px;
|
|
height: 12px;
|
|
border-radius: 5px;
|
|
background-color: @border-color-split;
|
|
cursor: pointer;
|
|
border-top: 4px solid #fff;
|
|
border-bottom: 4px solid #fff;
|
|
transition: background-color 0.3s ease;
|
|
|
|
&-with-marks {
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
&-track {
|
|
position: absolute;
|
|
left: 0;
|
|
height: 4px;
|
|
border-radius: @border-radius-base;
|
|
background-color: tint(@primary-color, 60%);
|
|
z-index: 1;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
&:hover {
|
|
background-color: #e1e1e1;
|
|
.@{slider-prefix-cls}-handle {
|
|
border-color: @primary-5;
|
|
}
|
|
}
|
|
|
|
&:hover &-track {
|
|
background-color: tint(@primary-color, 40%);
|
|
}
|
|
|
|
&-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: @component-background;
|
|
z-index: 2;
|
|
transition: border-color 0.3s ease, transform .3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
|
|
|
|
&:hover {
|
|
border-color: @primary-5;
|
|
transform: scale(1.2);
|
|
transform-origin: center center;
|
|
}
|
|
|
|
&:active {
|
|
box-shadow: 0 0 0 2px fadeout(@primary-color, 80%);
|
|
}
|
|
}
|
|
|
|
&-mark {
|
|
position: absolute;
|
|
top: 10px;
|
|
left: 0;
|
|
width: 100%;
|
|
font-size: @font-size-base;
|
|
z-index: 3;
|
|
}
|
|
|
|
&-mark-text {
|
|
position: absolute;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
color: @text-color-secondary;
|
|
|
|
&-active {
|
|
color: @text-color;
|
|
}
|
|
}
|
|
|
|
&-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 @border-color-split;
|
|
background-color: @component-background;
|
|
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 {
|
|
background-color: @border-color-split !important;
|
|
|
|
.@{slider-prefix-cls}-track {
|
|
background-color: @slider-disabled-color !important;
|
|
}
|
|
|
|
.@{slider-prefix-cls}-handle,
|
|
.@{slider-prefix-cls}-dot {
|
|
border-color: @slider-disabled-color!important;
|
|
background-color: @component-background;
|
|
cursor: not-allowed;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.@{slider-prefix-cls}-mark-text,
|
|
.@{slider-prefix-cls}-dot {
|
|
cursor: not-allowed!important;
|
|
}
|
|
}
|
|
}
|