-
Notifications
You must be signed in to change notification settings - Fork 0
/
mui-ripple.css
52 lines (52 loc) · 996 Bytes
/
mui-ripple.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
.ripple {
position: relative;
display: block;
overflow: hidden;
border: 0;
cursor: pointer;
outline: 0;
transform: translate(0, 0);
}
.ripple::before {
position: absolute;
z-index: -1;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
box-sizing: border-box;
padding-top: 50%;
padding-bottom: 50%;
margin: auto;
background: #000;
border-radius: 100%;
content: "";
opacity: 0;
pointer-events: none;
transform: scale(0, 0);
transition: all 1.5s, opacity 180ms;
}
.ripple:active::before {
opacity: 0.12;
transition: 0.5s;
}
.ripple:focus:not(:active)::before {
animation: anim 1.8s infinite;
animation-delay: 10ms; /* Ensures the content is rendered, so the scaling knows the actual size. */
}
@keyframes anim {
0%,
100% {
opacity: 0.14;
transform: scale(0.6, 0.6);
-moz-transform: translateY(-20%) scale(0.6, 0.6);
}
50% {
opacity: 0.1;
transform: scale(0.8, 0.8);
-moz-transform: translateY(-20%) scale(0.8, 0.8);
}
}