-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2-styles-multi.css
107 lines (92 loc) · 2.13 KB
/
2-styles-multi.css
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/* General ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
* {
box-sizing: border-box;
font-family: sans-serif;
}
input {
display: none;
opacity: 0;
width: 0;
height: 0;
}
.toggle {
margin: 1em;
}
.toggles {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
/* Label ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
.toggle-label {
display: flex;
flex-direction: row;
justify-content: flex-start;
height: 2.5em;
width: 8em;
cursor: pointer;
}
/* Inner ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
.toggle-inner {
display: inline-block;
position: absolute;
align-self: flex-start;
height: 2.5em;
width: 8em;
border: solid .1em #BBBBBB;
border-radius: 2.5em;
transition: .4s ease-in-out background-color;
}
[id^="toggle-0"]:checked ~ label .toggle-inner {
background-color: #E1013C;
}
.toggle-inner::before {
content: "No";
position: absolute;
font-weight: bold;
height: 100%;
width: 50%;
font-size: 1.5em;
line-height: 1.55em;
padding-left: 2.75em;
color: #BBBBBB;
transition: .2s ease-in-out opacity;
}
[id^="toggle-0"]:checked ~ label .toggle-inner::before {
opacity: 0;
}
.toggle-inner::after {
content: "Yes";
opacity: 0;
position: absolute;
font-weight: bold;
height: 100%;
width: 50%;
text-align: left;
font-size: 1.5em;
line-height: 1.55em;
padding-left: 1em;
color: #FFFFFF;
transition: .2s ease-in-out opacity;
}
[id^="toggle-0"]:checked ~ label .toggle-inner::after {
opacity: 1;
}
/* Switch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
.toggle-switch {
position: relative;
align-self: center;
height: 3em;
width: 3em;
border: solid .1em #BBBBBB;
background-color: #FFFFFF;
border-radius: 3em;
transition: .4s ease-in-out transform;
}
[id^="toggle-0"]:checked ~ label .toggle-switch {
transform: translateX(5em);
}