salix/front/core/components/check/style.scss

81 lines
1.9 KiB
SCSS

@import "variables";
vn-check {
position: relative;
display: inline-block;
outline: none;
cursor: pointer;
&.disabled {
cursor: initial;
}
& > .check {
position: relative;
box-sizing: border-box;
display: inline-block;
vertical-align: middle;
border-radius: 2px;
width: 20px;
height: 20px;
transition: background 250ms;
border: 2px solid #666;
margin: 6px 0;
margin-right: .4em;
& > .mark {
box-sizing: border-box;
position: absolute;
display: block;
border-width: 0;
}
}
&.checked > .check {
background-color: $color-main;
border-color: $color-main;
& > .focus-mark {
background-color: rgba($color-main, .15);
}
& > .mark {
top: 0;
left: 4px;
transform: rotate(45deg);
width: 7px;
height: 13px;
border: 2px solid $color-font-dark;
border-top: 0;
border-left: 0;
}
}
&.indeterminate > .check > .mark {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12px;
height: 2px;
border-bottom: 2px solid #666;
}
& > .check > .focus-mark {
position: absolute;
top: 50%;
left: 50%;
height: 38px;
width: 38px;
margin-top: -19px;
margin-left: -19px;
border-radius: 50%;
transform: scale3d(0, 0, 0);
transition: background 250ms;
transition: transform 250ms;
background-color: rgba(0, 0, 0, .1);
}
&:focus:not(.disabled) > .check > .focus-mark {
transform: scale3d(1, 1, 1);
}
& > vn-icon {
margin-left: 5px;
color: $color-font-secondary;
vertical-align: middle;
}
}