mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 06:09:34 +08:00
0ca6a1c24a
* css modularize * Add alert style * Move more component style * Move iconfont to common style * Move layout style * Move more component style * Move all components * Fix lots of mixin deps * remove css-prefix from less * fix a button icon style bug * restructure * fix index * add dist * fix jest * fix some components style * clean webpack config * check more components style * update tabs * update scripts * update scripts * fix form style * fix more style * Fix select width * Fix form and tabs style
95 lines
1.5 KiB
Plaintext
95 lines
1.5 KiB
Plaintext
@import "../../style/themes/default";
|
|
@import "../../style/mixins/index";
|
|
|
|
@switch-prefix-cls: ant-switch;
|
|
@switch-duration: .3s;
|
|
|
|
.@{switch-prefix-cls} {
|
|
position: relative;
|
|
display: inline-block;
|
|
box-sizing: border-box;
|
|
width: 44px;
|
|
height: 22px;
|
|
line-height: 20px;
|
|
vertical-align: middle;
|
|
border-radius: 20px;
|
|
border: 1px solid #ccc;
|
|
background-color: #ccc;
|
|
cursor: pointer;
|
|
transition: all @switch-duration @ease-in-out-circ;
|
|
user-select: none;
|
|
|
|
&-inner {
|
|
color: #fff;
|
|
font-size: 12px;
|
|
position: absolute;
|
|
left: 24px;
|
|
}
|
|
|
|
&:after {
|
|
position: absolute;
|
|
width: 18px;
|
|
height: 18px;
|
|
left: 2px;
|
|
top: 1px;
|
|
border-radius: 100%;
|
|
background-color: #fff;
|
|
content: " ";
|
|
cursor: pointer;
|
|
transition: left @switch-duration @ease-in-out-circ;
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: 0 0 0 2px fade(@primary-color, 20%);
|
|
outline: 0;
|
|
}
|
|
|
|
&:focus:hover {
|
|
box-shadow: none;
|
|
}
|
|
|
|
&-small {
|
|
height: 14px;
|
|
line-height: 12px;
|
|
width: 28px;
|
|
&:after {
|
|
width: 12px;
|
|
height: 12px;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
}
|
|
|
|
&-small&-checked:after {
|
|
left: 14px;
|
|
}
|
|
|
|
&-checked {
|
|
border: 1px solid @primary-color;
|
|
background-color: @primary-color;
|
|
|
|
.@{switch-prefix-cls}-inner {
|
|
left: 6px;
|
|
}
|
|
|
|
&:after {
|
|
left: 22px;
|
|
}
|
|
}
|
|
|
|
&-disabled {
|
|
cursor: not-allowed;
|
|
background: #f7f7f7;
|
|
border-color: #f7f7f7;
|
|
|
|
&:after {
|
|
background: #ccc;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
&-inner {
|
|
color: #ccc;
|
|
}
|
|
}
|
|
}
|