UNPKG

@zhangmmm/ming-ui

Version:
112 lines (95 loc) 1.95 kB
@import '../../style/index.less'; @radio-prefix-cls: ~'@{ming-prefix}-radio'; .@{radio-prefix-cls} { position: relative; display: inline-block; vertical-align: sub; &-wrapper { display: inline-block; position: relative; cursor: pointer; & + & { margin-left: @Sp-3; } &.@{radio-prefix-cls}-wrapper-disabled { cursor: not-allowed; } &-disabled { .@{radio-prefix-cls}-content { color: @M5; } .@{radio-prefix-cls}-input { cursor: not-allowed; } } } &-input { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; cursor: pointer; opacity: 0; transition: all 0.3s; } &-inner { display: block; width: 16px; height: 16px; background-color: #ffffff; border-radius: 50%; border: 1px solid @M6; &::after { position: absolute; top: 4px; left: 4px; display: table; width: 8px; height: 8px; background-color: @S3; border-top: 0; border-left: 0; border-radius: 8px; transform: scale(0); opacity: 0; transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86); content: ' '; } } &-content { padding: 0 @Sp-3; } &-checked { .@{radio-prefix-cls}-inner { border-color: @S3; } .@{radio-prefix-cls}-inner::after { opacity: 1; transform: scale(1); } &::after { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid @S3; border-radius: 50%; visibility: hidden; animation: antRadioEffect 0.36s ease-in-out; animation-fill-mode: both; content: ''; } } &-disabled { .@{radio-prefix-cls}-inner { background-color: rgba(@M6, 0.3); border-color: @M6; &::after { background-color: @M5; } } } }