forked from uiverse-io/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGalahhad_sweet-ape-100.html
107 lines (97 loc) · 3.09 KB
/
Galahhad_sweet-ape-100.html
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
<input type="checkbox" class="ui-checkbox">
<style>
/* From Uiverse.io by Galahhad - Source: https://ant.design/components/checkbox - Tags: checkbox, click animation, antd */
/* checkbox settings 👇 */
.ui-checkbox {
--primary-color: #1677ff;
--secondary-color: #fff;
--primary-hover-color: #4096ff;
/* checkbox */
--checkbox-diameter: 20px;
--checkbox-border-radius: 5px;
--checkbox-border-color: #d9d9d9;
--checkbox-border-width: 1px;
--checkbox-border-style: solid;
/* checkmark */
--checkmark-size: 1.2;
}
.ui-checkbox,
.ui-checkbox *,
.ui-checkbox *::before,
.ui-checkbox *::after {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.ui-checkbox {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: var(--checkbox-diameter);
height: var(--checkbox-diameter);
border-radius: var(--checkbox-border-radius);
background: var(--secondary-color);
border: var(--checkbox-border-width) var(--checkbox-border-style) var(--checkbox-border-color);
-webkit-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
cursor: pointer;
position: relative;
}
.ui-checkbox::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
-webkit-box-shadow: 0 0 0 calc(var(--checkbox-diameter) / 2.5) var(--primary-color);
box-shadow: 0 0 0 calc(var(--checkbox-diameter) / 2.5) var(--primary-color);
border-radius: inherit;
opacity: 0;
-webkit-transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
-o-transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
}
.ui-checkbox::before {
top: 40%;
left: 50%;
content: "";
position: absolute;
width: 4px;
height: 7px;
border-right: 2px solid var(--secondary-color);
border-bottom: 2px solid var(--secondary-color);
-webkit-transform: translate(-50%, -50%) rotate(45deg) scale(0);
-ms-transform: translate(-50%, -50%) rotate(45deg) scale(0);
transform: translate(-50%, -50%) rotate(45deg) scale(0);
opacity: 0;
-webkit-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6),opacity 0.1s;
-o-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6),opacity 0.1s;
transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6),opacity 0.1s;
}
/* actions */
.ui-checkbox:hover {
border-color: var(--primary-color);
}
.ui-checkbox:checked {
background: var(--primary-color);
border-color: transparent;
}
.ui-checkbox:checked::before {
opacity: 1;
-webkit-transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
-ms-transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
-webkit-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
-o-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
}
.ui-checkbox:active:not(:checked)::after {
-webkit-transition: none;
-o-transition: none;
-webkit-box-shadow: none;
box-shadow: none;
transition: none;
opacity: 1;
}
</style>