structure adjustment
This commit is contained in:
68
lib/ui/css/functions/checkbox.scss
Normal file
68
lib/ui/css/functions/checkbox.scss
Normal file
@ -0,0 +1,68 @@
|
||||
@mixin check-box() {
|
||||
.check-box-inner {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-color: #fff;
|
||||
border: 1px solid var(--box-color);
|
||||
user-select: none;
|
||||
border-radius: 2px;
|
||||
transition: all .2s;
|
||||
cursor: pointer;
|
||||
|
||||
>svg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
fill: #fff;
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
transition: all .08s cubic-bezier(.78, .14, .15, .86);
|
||||
}
|
||||
}
|
||||
|
||||
&.radiobox-wrapper {
|
||||
.check-box-inner {
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
>input[type="checkbox"],
|
||||
>input[type="radio"] {
|
||||
display: none;
|
||||
|
||||
&:checked+.check-box-inner {
|
||||
border-color: var(--link-color);
|
||||
background-color: var(--link-color);
|
||||
|
||||
>svg {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
&+.check-box-inner {
|
||||
border-color: var(--disabled-box-color);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&:checked+.check-box-inner {
|
||||
border-color: var(--disabled-box-color);
|
||||
background-color: var(--disabled-box-color);
|
||||
}
|
||||
|
||||
&~span {
|
||||
color: var(--disabled-box-color);
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
18
lib/ui/css/functions/func.scss
Normal file
18
lib/ui/css/functions/func.scss
Normal file
@ -0,0 +1,18 @@
|
||||
@mixin inset($top, $right, $bottom, $left) {
|
||||
top: $top;
|
||||
right: $right;
|
||||
bottom: $bottom;
|
||||
left: $left;
|
||||
}
|
||||
|
||||
@mixin scrollbar() {
|
||||
&::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(168, 168, 168, 0.9);
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user