2015-07-17 11:06:38 +08:00
|
|
|
@radioWrapPrefixCls: ant-radio;
|
|
|
|
@radioInnerPrefixCls: ~"@{radioWrapPrefixCls}-inner";
|
2015-07-16 22:48:53 +08:00
|
|
|
@radioDuration: .3s;
|
2015-07-16 18:23:25 +08:00
|
|
|
|
|
|
|
/* 一般状态 */
|
2015-07-17 11:06:38 +08:00
|
|
|
.@{radioWrapPrefixCls} {
|
2015-07-16 18:23:25 +08:00
|
|
|
white-space: nowrap;
|
|
|
|
outline: none;
|
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
|
|
|
line-height: 1;
|
|
|
|
vertical-align: middle;
|
|
|
|
&:hover {
|
|
|
|
.@{radioInnerPrefixCls} {
|
|
|
|
border-color: #bcbcbc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-inner {
|
|
|
|
&:after {
|
|
|
|
position: absolute;
|
|
|
|
width: 6px;
|
|
|
|
height: 6px;
|
|
|
|
left: 3px;
|
|
|
|
top:3px;
|
|
|
|
border-radius: 6px;
|
|
|
|
display: table;
|
|
|
|
border-top: 0;
|
|
|
|
border-left: 0;
|
|
|
|
content: ' ';
|
2015-07-16 22:48:53 +08:00
|
|
|
background-color: @primary-color;
|
2015-07-16 18:23:25 +08:00
|
|
|
transform: scale(0);
|
|
|
|
opacity: 0;
|
2015-07-16 22:48:53 +08:00
|
|
|
transition: transform @radioDuration @ease-in-out-circ,opacity @radioDuration @ease-in-out-circ,background-color @radioDuration @ease-in-out-circ;
|
2015-07-16 18:23:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
display: inline-block;
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
border-width: 1px;
|
|
|
|
border-style: solid;
|
|
|
|
border-radius: 14px;
|
|
|
|
border-color: #d9d9d9;
|
|
|
|
background-color: #ffffff;
|
2015-07-16 22:48:53 +08:00
|
|
|
transition: border-color @radioDuration @ease-in-out-circ, background-color @radioDuration @ease-in-out-circ;
|
2015-07-16 18:23:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-input {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
z-index: 9999;
|
|
|
|
cursor: pointer;
|
|
|
|
opacity: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 选中状态 */
|
2015-07-17 11:06:38 +08:00
|
|
|
.@{radioWrapPrefixCls}-checked {
|
2015-07-16 18:23:25 +08:00
|
|
|
|
|
|
|
.@{radioInnerPrefixCls} {
|
|
|
|
border-color: #d9d9d9;
|
|
|
|
&:after {
|
|
|
|
transform: scale(1);
|
|
|
|
opacity: 1;
|
2015-07-16 22:48:53 +08:00
|
|
|
transition: transform @radioDuration @ease-out-back,opacity @radioDuration @ease-in-out-circ,background-color @radioDuration @ease-in-out-circ;
|
2015-07-16 18:23:25 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-17 11:06:38 +08:00
|
|
|
.@{radioWrapPrefixCls}-disabled {
|
2015-07-16 18:23:25 +08:00
|
|
|
&:hover {
|
|
|
|
.@{radioInnerPrefixCls} {
|
|
|
|
border-color: #d9d9d9;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.@{radioInnerPrefixCls} {
|
|
|
|
border-color: #d9d9d9;
|
|
|
|
background-color: #f3f3f3;
|
|
|
|
&:after {
|
|
|
|
background-color: #cccccc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{radioInnerPrefixCls}-input {
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
}
|
2015-07-17 11:06:38 +08:00
|
|
|
|
|
|
|
.@{radioWrapPrefixCls} + span {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|