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.
103 lines
2.2 KiB
103 lines
2.2 KiB
@radio-group-prefix-cls: ant-radio-group;
|
|
@radio-wrap-prefix-cls: ant-radio;
|
|
@radio-inner-prefix-cls: ~"@{radio-wrap-prefix-cls}-inner";
|
|
@radio-duration: .3s;
|
|
|
|
.@{radio-group-prefix-cls} {
|
|
label {
|
|
margin-right: 16px;
|
|
}
|
|
}
|
|
|
|
// 一般状态
|
|
.@{radio-wrap-prefix-cls} {
|
|
white-space: nowrap;
|
|
outline: none;
|
|
display: inline-block;
|
|
position: relative;
|
|
line-height: 1;
|
|
vertical-align: middle;
|
|
&:hover {
|
|
.@{radio-inner-prefix-cls} {
|
|
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: ' ';
|
|
background-color: @primary-color;
|
|
transform: scale(0);
|
|
opacity: 0;
|
|
transition: transform @radio-duration @ease-in-out-circ, opacity @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ;
|
|
}
|
|
|
|
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: #fff;
|
|
transition: border-color @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ;
|
|
}
|
|
|
|
&-input {
|
|
position: absolute;
|
|
left: 0;
|
|
z-index: 9999;
|
|
cursor: pointer;
|
|
opacity: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
right: 0;
|
|
}
|
|
}
|
|
|
|
// 选中状态
|
|
.@{radio-wrap-prefix-cls}-checked {
|
|
|
|
.@{radio-inner-prefix-cls} {
|
|
border-color: #d9d9d9;
|
|
&:after {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
transition: transform @radio-duration @ease-out-back, opacity @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ;
|
|
}
|
|
}
|
|
}
|
|
|
|
.@{radio-wrap-prefix-cls}-disabled {
|
|
&:hover {
|
|
.@{radio-inner-prefix-cls} {
|
|
border-color: #d9d9d9;
|
|
}
|
|
}
|
|
.@{radio-inner-prefix-cls} {
|
|
border-color: #d9d9d9;
|
|
background-color: #f3f3f3;
|
|
&:after {
|
|
background-color: #cccccc;
|
|
}
|
|
}
|
|
|
|
.@{radio-inner-prefix-cls}-input {
|
|
cursor: default;
|
|
}
|
|
}
|
|
|
|
.@{radio-wrap-prefix-cls} + span {
|
|
margin-left: 8px;
|
|
}
|
|
|