-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanimations.css
120 lines (114 loc) · 2.52 KB
/
animations.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
108
109
110
111
112
113
114
115
116
117
118
119
120
*{ box-sizing: border-box; user-select: none; }
html, body{ margin: 0; height: 100%; }
body{
display: flex;
background: radial-gradient(#4719ff 5%, #876afc);
justify-content: center;
align-items: center;
font: 24px/1.4 "RobotoDraft", sans-serif;
color: #fff;
table: th, td {
border: 1px solid white;
}
}
section{
display: flex;
flex-direction: column;
padding: 0.1em;
}
h1{
font-weight: 400;
font-size: 2em;
cursor: default;
margin: 0 0 .1em 0;
}
input[type='checkbox'] + label{
position: relative;
display: flex;
margin: .1em 0;
align-items: center;
color: #9e9e9e;
transition: color 250ms cubic-bezier(.4,.0,.23,1);
}
input[type='checkbox'] + label > ins{
position: absolute;
display: block;
bottom: 0;
left: .0em;
height: 0;
width: 100%;
overflow: hidden;
text-decoration: none;
transition: height 300ms cubic-bezier(.4,.0,.23,1);
}
input[type='checkbox'] + label > ins > i{
position: absolute;
bottom: 0;
font-style: normal;
color: #4FC3F7;
}
input[type='checkbox'] + label > span{
display: flex;
justify-content: center;
align-items: center;
margin-right: 0em;
width: 1em;
height: 1em;
background: transparent;
border: 2px solid #9E9E9E;
border-radius: 2px;
cursor: pointer;
transition: all 250ms cubic-bezier(.4,.0,.23,1);
}
input[type='checkbox'] + label:hover, input[type='checkbox']:focus + label{
color: #fff;
}
input[type='checkbox'] + label:hover > span, input[type='checkbox']:focus + label > span{
background: rgba(255,255,255,.1);
}
input[type='checkbox']:checked + label > ins{ height: 100%; }
input[type='checkbox']:checked + label > span{
border: .5em solid #FFEB3B;
animation: shrink-bounce 200ms cubic-bezier(.4,.0,.23,1);
}
input[type='checkbox']:checked + label > span:before{
content: "";
position: absolute;
top: .6em;
left: .2em;
border-right: 3px solid transparent;
border-bottom: 3px solid transparent;
transform: rotate(45deg);
transform-origin: 0% 100%;
animation: checkbox-check 125ms 250ms cubic-bezier(.4,.0,.23,1) forwards;
}
@keyframes shrink-bounce{
0%{
transform: scale(1);
}
33%{
transform: scale(.85);
}
100%{
transform: scale(1);
}
}
@keyframes checkbox-check{
0%{
width: 0;
height: 0;
border-color: #616161;
transform: translate3d(0,0,0) rotate(45deg);
}
33%{
width: .2em;
height: 0;
transform: translate3d(0,0,0) rotate(45deg);
}
100%{
width: .2em;
height: .5em;
border-color: #616161;
transform: translate3d(0,-.5em,0) rotate(45deg);
}
}