@mdsfe/mds-ui
Version:
A set of enterprise-class Vue UI components.
187 lines (186 loc) • 4.37 kB
CSS
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable declaration-bang-space-before */
/* stylelint-disable declaration-bang-space-before */
@keyframes mdsCheckboxEffect {
0% {
transform: scale(1);
opacity: 0.5;
}
100% {
transform: scale(1.6);
opacity: 0;
}
}
.clums .mds-checkbox-wrapper.mds-checkbox-group-item {
display: block;
margin-bottom: 16px;
}
.mds-checkbox {
white-space: nowrap;
cursor: pointer;
outline: none;
display: inline-block;
line-height: 1;
position: relative;
vertical-align: text-bottom;
}
.mds-checkbox-wrapper:hover .mds-checkbox-inner,
.mds-checkbox:hover .mds-checkbox-inner,
.mds-checkbox-input:focus + .mds-checkbox-inner {
border-color: #0364FF;
}
.mds-checkbox-checked:after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 2px;
border: 1px solid #0364FF;
content: '';
animation: mdsCheckboxEffect 0.36s ease-in-out;
animation-fill-mode: both;
visibility: hidden;
}
.mds-checkbox:hover:after,
.mds-checkbox-wrapper:hover .mds-checkbox:after {
visibility: visible;
}
.mds-checkbox-inner {
position: relative;
top: 0;
left: 0;
display: block;
width: 16px;
height: 16px;
border: 1px solid #D8DCE6;
border-radius: 2px;
background-color: #fff;
transition: all .3s;
}
.mds-checkbox-inner:after {
transform: rotate(45deg) scale(0);
position: absolute;
left: 4.3px;
top: 1px;
display: block;
width: 6px;
height: 10px;
border: 2px solid #fff;
border-top: 0;
border-left: 0;
content: ' ';
transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6);
}
.mds-checkbox-input {
position: absolute;
left: 0;
z-index: 1;
cursor: pointer;
opacity: 0;
filter: alpha(opacity=0);
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
}
.mds-checkbox-indeterminate .mds-checkbox-inner {
background: #fff;
}
.mds-checkbox-indeterminate .mds-checkbox-inner:after {
content: '';
transform: scale(1);
position: absolute;
left: 2.85714286px;
top: 2.85714286px;
width: 10.28571429px;
height: 10.28571429px;
background: #0364FF;
}
.mds-checkbox-indeterminate.mds-checkbox-disabled .mds-checkbox-inner:after {
border-color: rgba(0, 0, 0, 0.2);
}
.mds-checkbox-checked .mds-checkbox-inner:after {
transform: rotate(45deg) scale(1);
position: absolute;
display: block;
border: 2px solid #fff;
border-top: 0;
border-left: 0;
content: ' ';
transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
}
.mds-checkbox-checked .mds-checkbox-inner {
background-color: #0364FF;
border-color: #0364FF;
}
.mds-checkbox-disabled {
cursor: not-allowed;
}
.mds-checkbox-disabled.mds-checkbox-checked .mds-checkbox-inner:after {
animation-name: none;
border-color: #D8DCE6;
}
.mds-checkbox-disabled .mds-checkbox-input {
cursor: not-allowed;
}
.mds-checkbox-disabled .mds-checkbox-inner {
border-color: #D8DCE6 ;
background-color: #FAFAFD;
}
.mds-checkbox-disabled .mds-checkbox-inner:after {
animation-name: none;
border-color: #FAFAFD;
}
.mds-checkbox-disabled + span {
color: #aaaaaa ;
cursor: not-allowed;
}
.mds-checkbox-wrapper {
cursor: pointer;
font-size: 14px;
display: inline-block;
}
.mds-checkbox-wrapper + .mds-checkbox-wrapper {
margin-left: 8px;
}
.mds-checkbox-wrapper + span,
.mds-checkbox + span {
padding-left: 8px;
padding-right: 8px;
color: #354052;
}
.mds-checkbox-group {
font-size: 14px;
}
.mds-checkbox-group-item {
display: inline-block;
margin-right: 20px;
}
.mds-checkbox-group-item:last-child {
margin-right: 0;
}
.mds-checkbox-group-item + .mds-checkbox-group-item {
margin-left: 0;
}
@media \0screen {
.mds-checkbox-checked .mds-checkbox-inner:before,
.mds-checkbox-checked .mds-checkbox-inner:after {
font-family: 'mdsicon';
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\E632";
font-weight: bold;
font-size: 8px;
border: 0;
color: #fff;
left: 2px;
top: 3px;
position: absolute;
}
}
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable declaration-bang-space-before */
/* stylelint-disable declaration-bang-space-before */