You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.1 KiB

@radioGroupPrefixCls: ant-radio-group;
@radioWrapPrefixCls: ant-radio;
@radioInnerPrefixCls: ~"@{radioWrapPrefixCls}-inner";
@radioDuration: .3s;
10 years ago
9 years ago
.@{radioGroupPrefixCls} {
9 years ago
label {
margin-right: 16px;
9 years ago
}
}
10 years ago
/* 一般状态 */
.@{radioWrapPrefixCls} {
10 years ago
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;
9 years ago
top: 3px;
10 years ago
border-radius: 6px;
display: table;
border-top: 0;
border-left: 0;
content: ' ';
background-color: @primary-color;
10 years ago
transform: scale(0);
opacity: 0;
9 years ago
transition: transform @radioDuration @ease-in-out-circ, opacity @radioDuration @ease-in-out-circ, background-color @radioDuration @ease-in-out-circ;
10 years ago
}
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;
transition: border-color @radioDuration @ease-in-out-circ, background-color @radioDuration @ease-in-out-circ;
10 years ago
}
&-input {
position: absolute;
left: 0;
z-index: 9999;
cursor: pointer;
opacity: 0;
top: 0;
bottom: 0;
right: 0;
}
}
/* 选中状态 */
.@{radioWrapPrefixCls}-checked {
10 years ago
.@{radioInnerPrefixCls} {
border-color: #d9d9d9;
&:after {
transform: scale(1);
opacity: 1;
9 years ago
transition: transform @radioDuration @ease-out-back, opacity @radioDuration @ease-in-out-circ, background-color @radioDuration @ease-in-out-circ;
10 years ago
}
}
}
.@{radioWrapPrefixCls}-disabled {
10 years ago
&:hover {
.@{radioInnerPrefixCls} {
border-color: #d9d9d9;
}
}
.@{radioInnerPrefixCls} {
border-color: #d9d9d9;
background-color: #f3f3f3;
&:after {
background-color: #cccccc;
}
}
.@{radioInnerPrefixCls}-input {
cursor: default;
}
}
.@{radioWrapPrefixCls} + span {
margin-left: 8px;
}