sci-pro
Version:
70 lines (69 loc) • 1.46 kB
CSS
.sci-checkbox {
align-items: center;
width: 14px;
cursor: pointer;
}
.sci-checkbox .sci-checkbox__input {
display: inline-flex;
align-items: center;
}
.sci-checkbox input {
position: absolute;
z-index: -1;
width: 0;
height: 0;
margin: 0;
outline: none;
opacity: 0;
}
.sci-checkbox .sci-checkbox__inner {
position: relative;
box-sizing: border-box;
display: inline-block;
width: 14px;
height: 14px;
background: #fff;
border: 1px solid #dcdfe6;
border-radius: 2px;
}
.sci-checkbox .sci-checkbox__inner::after {
position: absolute;
top: 1px;
left: 4px;
box-sizing: content-box;
width: 3px;
height: 7px;
content: '';
border: 1px solid transparent;
border-top: 0;
border-left: 0;
transition: transform 0.15s ease-in 0.05s;
transform: rotate(45deg) scaleY(0);
transform-origin: center;
}
.sci-checkbox.is-checked .sci-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.sci-checkbox.is-checked .sci-checkbox__inner::after {
border-color: #fff;
transform: rotate(45deg) scaleY(1);
}
.sci-checkbox.is-indeterminate .sci-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.sci-checkbox.is-indeterminate .sci-checkbox__inner::before {
position: absolute;
top: 5px;
right: 0;
left: 0;
display: block;
height: 2px;
content: '';
background-color: #fff;
transform: scale(0.5);
}
.sci-checkbox .sci-chckbox-label {
padding-left: 8px;
}