2019-10-04 10:33:16 +00:00
|
|
|
@import "variables";
|
|
|
|
|
|
|
|
.vn-toggle {
|
|
|
|
position: relative;
|
|
|
|
cursor: pointer;
|
2019-10-09 22:47:29 +00:00
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
2019-10-04 10:33:16 +00:00
|
|
|
outline: none;
|
|
|
|
|
|
|
|
& > span {
|
2019-10-28 16:31:33 +00:00
|
|
|
font-size: 1rem;
|
2019-10-18 19:36:30 +00:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
2019-10-04 10:33:16 +00:00
|
|
|
}
|
|
|
|
& > .btn {
|
|
|
|
position: relative;
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
2019-10-09 22:47:29 +00:00
|
|
|
min-width: 20px;
|
2019-10-04 10:33:16 +00:00
|
|
|
margin: 6px 0;
|
2019-10-09 22:47:29 +00:00
|
|
|
margin-right: .6em;
|
2019-10-04 10:33:16 +00:00
|
|
|
border: 2px solid #666;
|
|
|
|
}
|
|
|
|
& > .btn > .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);
|
|
|
|
}
|
2019-10-28 16:31:33 +00:00
|
|
|
&.checked > .btn {
|
2019-11-10 10:08:44 +00:00
|
|
|
border-color: $color-button;
|
2019-10-28 16:31:33 +00:00
|
|
|
|
|
|
|
& > .focus-mark {
|
2019-11-10 10:08:44 +00:00
|
|
|
background-color: rgba($color-button, .15);
|
2019-10-28 16:31:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
&.disabled {
|
|
|
|
cursor: inherit;
|
|
|
|
|
|
|
|
&.checked > .btn {
|
|
|
|
border-color: $color-font-secondary;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&.readonly {
|
|
|
|
cursor: inherit;
|
|
|
|
}
|
2019-10-04 10:33:16 +00:00
|
|
|
&:focus:not(.disabled) > .btn > .focus-mark {
|
|
|
|
transform: scale3d(1, 1, 1);
|
|
|
|
}
|
|
|
|
}
|