ygd
Version:
An enterprise-class UI design language and React-based implementation
303 lines (302 loc) • 6.89 kB
CSS
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
.yg-radio-group {
box-sizing: content-box;
margin: 0;
padding: 0;
color: #333;
font-size: 12px;
list-style: none;
display: inline-block;
line-height: unset;
}
.yg-radio-wrapper {
box-sizing: content-box;
margin: 0;
padding: 0;
color: #333;
font-size: 12px;
list-style: none;
position: relative;
display: inline-block;
line-height: 28px;
height: 28px;
white-space: nowrap;
cursor: pointer;
}
.yg-radio-wrapper:not(:last-of-type) {
margin-right: 15px;
margin-bottom: 10px;
}
.yg-radio {
box-sizing: content-box;
margin: 0;
padding: 0;
color: #333;
font-size: 12px;
list-style: none;
position: relative;
display: inline-block;
white-space: nowrap;
vertical-align: middle;
outline: none;
cursor: pointer;
}
.yg-radio-wrapper:hover .yg-radio,
.yg-radio:hover .yg-radio-inner,
.yg-radio-input:focus + .yg-radio-inner {
border-color: #00a1ff;
}
.yg-radio-input:focus + .yg-radio-inner {
box-shadow: 0 0 0 3px rgba(0, 161, 255, 0.08);
}
.yg-radio-checked::after {
position: absolute;
top: -1px;
left: -1px;
width: 100%;
height: 100%;
border: 1px solid #00a1ff;
border-radius: 50%;
visibility: hidden;
-webkit-animation: antRadioEffect 0.36s ease-in-out;
animation: antRadioEffect 0.36s ease-in-out;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
content: '';
}
.yg-radio:hover::after,
.yg-radio-wrapper:hover .yg-radio::after {
visibility: visible;
}
.yg-radio-inner {
position: relative;
top: 0;
left: 0;
display: block;
width: 16px;
height: 16px;
background-color: #fff;
border-width: 1px;
border-style: solid;
border-color: #ccc;
border-radius: 100px;
transition: all 0.3s;
}
.yg-radio-inner::after {
position: absolute;
top: 4px;
left: 4px;
display: table;
width: 8px;
height: 8px;
background-color: #00a1ff;
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: ' ';
}
.yg-radio-input {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
cursor: pointer;
opacity: 0;
}
.yg-radio-checked .yg-radio-inner {
border-color: #00a1ff;
}
.yg-radio-checked .yg-radio-inner::after {
transform: scale(0.875);
opacity: 1;
transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
}
.yg-radio-disabled .yg-radio-inner {
background-color: #f5f5f5;
border-color: #ccc;
cursor: not-allowed;
}
.yg-radio-disabled .yg-radio-inner::after {
background-color: rgba(0, 0, 0, 0.2);
}
.yg-radio-disabled .yg-radio-input {
cursor: not-allowed;
}
.yg-radio-disabled + span {
color: rgba(51, 51, 51, 0.25);
cursor: not-allowed;
}
span.yg-radio + * {
padding-right: 5px;
padding-left: 5px;
vertical-align: middle;
}
.yg-radio-button-wrapper {
position: relative;
display: inline-block;
height: 28px;
margin: 0;
padding: 0 15px;
color: #333;
line-height: 28px;
background: #fff;
border: 1px solid #ccc;
border-top-width: 1px;
border-left: 0;
cursor: pointer;
transition: color 0.3s, background 0.3s, border-color 0.3s;
}
.yg-radio-button-wrapper a {
color: #333;
}
.yg-radio-button-wrapper > .yg-radio-button {
display: block;
width: 0;
height: 0;
margin-left: 0;
}
.yg-radio-group-large .yg-radio-button-wrapper {
height: 38px;
font-size: 14px;
line-height: 36px;
}
.yg-radio-group-small .yg-radio-button-wrapper {
height: 22px;
padding: 0 7px;
line-height: 20px;
}
.yg-radio-button-wrapper:not(:first-child)::before {
position: absolute;
top: 0;
left: -1px;
display: block;
width: 1px;
height: 100%;
background-color: #ccc;
content: '';
}
.yg-radio-button-wrapper:first-child {
border-left: 1px solid #ccc;
border-radius: 2px 0 0 2px;
}
.yg-radio-button-wrapper:last-child {
border-radius: 0 2px 2px 0;
}
.yg-radio-button-wrapper:first-child:last-child {
border-radius: 2px;
}
.yg-radio-button-wrapper:hover {
position: relative;
color: #00a1ff;
}
.yg-radio-button-wrapper:focus-within {
outline: 3px solid rgba(0, 161, 255, 0.06);
}
.yg-radio-button-wrapper .yg-radio-inner,
.yg-radio-button-wrapper input[type='checkbox'],
.yg-radio-button-wrapper input[type='radio'] {
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
.yg-radio-button-wrapper-checked {
z-index: 1;
color: #00a1ff;
background: #fff;
border-color: #00a1ff;
box-shadow: -1px 0 0 0 #00a1ff;
}
.yg-radio-button-wrapper-checked::before {
background-color: #00a1ff;
opacity: 0.1;
}
.yg-radio-button-wrapper-checked:first-child {
border-color: #00a1ff;
box-shadow: none;
}
.yg-radio-button-wrapper-checked:hover {
color: #29b8ff;
border-color: #29b8ff;
box-shadow: -1px 0 0 0 #29b8ff;
}
.yg-radio-button-wrapper-checked:active {
color: #0082d9;
border-color: #0082d9;
box-shadow: -1px 0 0 0 #0082d9;
}
.yg-radio-button-wrapper-checked:focus-within {
outline: 3px solid rgba(0, 161, 255, 0.06);
}
.yg-radio-group-solid .yg-radio-button-wrapper-checked:not(.yg-radio-button-wrapper-disabled) {
color: #fff;
background: #00a1ff;
border-color: #00a1ff;
}
.yg-radio-group-solid .yg-radio-button-wrapper-checked:not(.yg-radio-button-wrapper-disabled):hover {
color: #fff;
background: #29b8ff;
border-color: #29b8ff;
}
.yg-radio-group-solid .yg-radio-button-wrapper-checked:not(.yg-radio-button-wrapper-disabled):active {
color: #fff;
background: #0082d9;
border-color: #0082d9;
}
.yg-radio-group-solid .yg-radio-button-wrapper-checked:not(.yg-radio-button-wrapper-disabled):focus-within {
outline: 3px solid rgba(0, 161, 255, 0.06);
}
.yg-radio-button-wrapper-disabled {
color: rgba(51, 51, 51, 0.25);
background-color: #f5f5f5;
border-color: #ccc;
cursor: not-allowed;
}
.yg-radio-button-wrapper-disabled:first-child,
.yg-radio-button-wrapper-disabled:hover {
color: rgba(51, 51, 51, 0.25);
background-color: #f5f5f5;
border-color: #ccc;
}
.yg-radio-button-wrapper-disabled:first-child {
border-left-color: #ccc;
}
.yg-radio-button-wrapper-disabled.yg-radio-button-wrapper-checked {
color: #fff;
background-color: #e6e6e6;
border-color: #ccc;
box-shadow: none;
}
@-webkit-keyframes antRadioEffect {
0% {
transform: scale(1);
opacity: 0.5;
}
100% {
transform: scale(1.6);
opacity: 0;
}
}
@keyframes antRadioEffect {
0% {
transform: scale(1);
opacity: 0.5;
}
100% {
transform: scale(1.6);
opacity: 0;
}
}
@supports (-moz-appearance: meterbar) and (background-blend-mode: difference, normal) {
.yg-radio {
vertical-align: text-bottom;
}
}