UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

155 lines (127 loc) 3.54 kB
@import '../../../../lib/style/themes/default'; @import '../../../../lib/style/mixins/index'; @import 'mixin'; @pro-radio-prefix-cls: ~'@{c7n-pro-prefix}-radio'; @radio-duration: @animation-duration-slow; .@{pro-radio-prefix-cls} { .radio-btn; &-wrapper, &-wrapper.@{field-prefix-cls} { display: inline-flex; } &-inner { position: relative; display: inline-block; width: @radio-size; height: @radio-size; vertical-align: middle; background-color: #fff; border: @radio-border-width @border-style-base @radio-border-color; border-radius: 50%; transition: all @radio-duration; &::before { position: absolute; top: @radio-size / 4 - @radio-border-width / 2; left: @radio-size / 4 - @radio-border-width / 2; width: @radio-size / 2 - @radio-border-width; height: @radio-size / 2 - @radio-border-width; background-color: @radio-dot-color; border-radius: 50%; transform: scale(0); opacity: 0; transition: all @radio-duration @ease-in-out-circ; content: ' '; } & + span { padding-right: 0.08rem; padding-left: 0.08rem; } } &&:checked + &-inner { border-color: @radio-dot-color; &::before { background-color: @radio-dot-color; transform: scale(1); opacity: 1; } } &&:hover:not(:checked) + &-inner, &-wrapper:hover &&:not(:checked) + &-inner, &&:focus:not(:checked) + &-inner { border-color: @radio-uncheck-hover-border-color; &::before { background-color: @radio-uncheck-hover-border-color; } } &-highlight &-inner { border-color: @input-highlight-border-color; } &-highlight &&:checked + &-inner { border-color: @input-highlight-border-color; &::before { background-color: @input-highlight-border-color; } } &&:focus + &-inner { box-shadow: 0 0 @outline-blur-size @outline-width @radio-shadow-color; } &&:disabled + &-inner { color: @radio-disabled-color; background-color: @radio-disabled-bg; border-color: @radio-disabled-border-color !important; &::before { background-color: @radio-disabled-color; } } &&:disabled:checked + &-inner { color: @radio-disabled-check-color; background-color: @radio-disabled-check-bg; border-color: @radio-disabled-check-border-color !important; &::before { background-color: @radio-disabled-check-color; } } &-label { flex-basis: auto; flex-grow: 1; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; } &-button { padding: 0 0.15rem; line-height: 0.3rem; background-color: #fff; .@{pro-radio-prefix-cls}-inner { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto; background-color: transparent; border-radius: @border-radius-base; &::before { display: none; } & + span { position: relative; z-index: 1; padding: 0; } } .@{pro-radio-prefix-cls}:checked + .@{pro-radio-prefix-cls}-inner { z-index: 1; & + span { color: @radio-dot-color; } } &:hover .@{pro-radio-prefix-cls}-inner + span { color: @radio-dot-color; } } &-button + &-button { margin-left: @btn-group-spacing; } }