mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 07:09:55 +08:00
2bced36f0c
* Tweak button padding
* upgrade input and button size
* update form controls size
* update components size
* Add lemon color and update rate color
* Add new icons
* update layout style
* breadcrumb and dropdown
* update menu arrow width
* update layout and menu
* update steps
* fix var name
* update cascasder style
* Update DatePicker
* update InputNumber and Mention
* radio and switch
* select and transfer
* TimePicker & Upload
* more components
* calendar and list
* Tree Timeline Popover Tag
* divider modal popover
* update search input
* update card style
* update switch disabled opacity
* update shoadow and mask
* Add v2-compatible-reset.less
* Fix undefined className
* update snahshotssssssssssssssssss 👻
118 lines
2.1 KiB
Plaintext
118 lines
2.1 KiB
Plaintext
@import "../../style/themes/default";
|
|
@import "../../style/mixins/index";
|
|
|
|
@switch-prefix-cls: ~"@{ant-prefix}-switch";
|
|
@switch-duration: .36s;
|
|
|
|
.@{switch-prefix-cls} {
|
|
.reset-component;
|
|
position: relative;
|
|
display: inline-block;
|
|
box-sizing: border-box;
|
|
height: @switch-height;
|
|
min-width: 44px;
|
|
line-height: @switch-height - 2px;
|
|
vertical-align: middle;
|
|
border-radius: 100px;
|
|
border: 1px solid transparent;
|
|
background-color: @disabled-color;
|
|
cursor: pointer;
|
|
transition: all @switch-duration;
|
|
user-select: none;
|
|
|
|
&-inner {
|
|
color: #fff;
|
|
font-size: @font-size-base;
|
|
margin-left: 24px;
|
|
margin-right: 6px;
|
|
display: block;
|
|
}
|
|
|
|
&:after {
|
|
position: absolute;
|
|
width: @switch-height - 4px;
|
|
height: @switch-height - 4px;
|
|
left: 1px;
|
|
top: 1px;
|
|
|
|
border-radius: 18px;
|
|
background-color: @component-background;
|
|
content: " ";
|
|
cursor: pointer;
|
|
transition: all @switch-duration @ease-in-out-circ;
|
|
}
|
|
|
|
&:active:after {
|
|
width: 24px;
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: 0 0 0 2px fade(@primary-color, 20%);
|
|
outline: 0;
|
|
}
|
|
|
|
&:focus:hover {
|
|
box-shadow: none;
|
|
}
|
|
|
|
&-small {
|
|
height: @switch-sm-height;
|
|
min-width: 28px;
|
|
line-height: @switch-sm-height - 2px;
|
|
|
|
.@{switch-prefix-cls}-inner {
|
|
margin-left: 18px;
|
|
margin-right: 3px;
|
|
font-size: @font-size-sm;
|
|
}
|
|
|
|
&:after {
|
|
width: @switch-sm-height - 4px;
|
|
height: @switch-sm-height - 4px;
|
|
}
|
|
|
|
&:active:after {
|
|
width: 16px;
|
|
}
|
|
}
|
|
|
|
&-small&-checked {
|
|
&:after {
|
|
left: 100%;
|
|
margin-left: -12.5px;
|
|
}
|
|
|
|
.@{switch-prefix-cls}-inner {
|
|
margin-left: 3px;
|
|
margin-right: 18px;
|
|
}
|
|
}
|
|
|
|
&-small:active&-checked:after {
|
|
margin-left: -16.5px;
|
|
}
|
|
|
|
&-checked {
|
|
background-color: @primary-color;
|
|
|
|
.@{switch-prefix-cls}-inner {
|
|
margin-left: 6px;
|
|
margin-right: 24px;
|
|
}
|
|
|
|
&:after {
|
|
left: 100%;
|
|
margin-left: -19px;
|
|
}
|
|
|
|
&:active:after {
|
|
margin-left: -25px;
|
|
}
|
|
}
|
|
|
|
&-disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.35;
|
|
}
|
|
}
|