-
Notifications
You must be signed in to change notification settings - Fork 354
Expand file tree
/
Copy pathencoding-format-toggle-switch.module.scss
More file actions
82 lines (73 loc) · 1.74 KB
/
encoding-format-toggle-switch.module.scss
File metadata and controls
82 lines (73 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@use "@/libs/theme/styles/variables" as *;
.container {
display: flex;
align-items: center;
gap: .5rem;
}
.label {
display: flex;
flex-direction: column;
text-transform: uppercase;
font-size: .75rem;
line-height: 1.25rem;
color: var(--color_fg_default);
letter-spacing: .1px;
}
.fullLabel {
display: none;
font-size: .8125rem;
font-weight: 500;
@media #{$breakpoint-dimension-sm} {
display: unset;
}
}
.input {
opacity: 0;
width: 0;
height: 0;
}
.switch__container {
position: relative;
display: inline-block;
width: 40px;
height: 24px;
transition: all .25s cubic-bezier(.17,.67,.83,.67);
}
.picker__round {
border-radius: 24px;
&::before {
border-radius: 50%;
}
}
.picker__slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--color_bg_layer_bold);
border: 1px solid var(--color_border_default);
box-shadow: 0 0 1px rgba(0,0,0,.06),0 0 1px rgba(0,0,0,.06),inset 0 1px 1px .5px rgba(0,0,0,.04);
transition: background-color .25s cubic-bezier(.17,.67,.83,.67),border .25s ease;
&::before {
position: absolute;
content: "";
height: 16px;
width: 16px;
top: 3px;
left: 3px;
background: linear-gradient(180deg,transparent,rgba(0,0,0,.08)),#fff;
box-shadow: 0 2px 2px -1px rgba(0,0,0,.2),0 2px 4px -2px rgba(0,0,0,.2),inset 0 .5px .5px hsla(0,0%,100%,.12);
transition: transform .25s cubic-bezier(.34,1.56,.64,1),background-color .2s ease;
will-change: transform;
}
}
input:checked+.picker__slider {
background-color: var(--color_fg_bold);
border: 1px solid var(--color_fg_bold);
&::before {
transform: translateX(16px);
background-color: var(--color_fg_on_state_success);
}
}