-
Notifications
You must be signed in to change notification settings - Fork 0
/
link-grid.styl
101 lines (91 loc) · 1.8 KB
/
link-grid.styl
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
.post-body .link-grid {
display: grid;
grid-gap: 1.5rem 1.5rem;
grid-template-columns: 1fr 1fr;
padding: 1.5rem;
user-select: none;
+mobile() {
grid-template-columns: 1fr;
}
div {
border: solid #ddd;
box-shadow: 1rem 1rem 0.5rem gray;
height: 5rem;
transition: background 0.3s;
padding: 0.5rem;
position: relative;
&:hover {
animation: shake 0.5s;
background: rgba(230,244,250,.5);
}
&:active {
box-shadow: 0.5rem 0.5rem 0.25rem gray;
transform: translate(0.2rem, 0.2rem);
}
img {
border: 1px solid #ddd;
border-radius: 50%;
box-sizing: border-box;
height: 5rem;
left: 0.5rem;
padding: 3px;
position: absolute;
top: 0.5rem;
width: 5rem;
}
p {
margin: 0 1rem 0 6rem;
&:first-of-type {
font-size: 1.2em;
}
&:last-of-type {
font-size: 0.8em;
line-height: 1.3rem;
opacity: 0.7;
}
}
a {
border: none;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
}
}
@keyframes shake {
0% {
transform: translate(1pt, 1pt) rotate(0deg);
}
10% {
transform: translate(-1pt, -2pt) rotate(-1deg);
}
20% {
transform: translate(-3pt, 0pt) rotate(1deg);
}
30% {
transform: translate(3pt, 2pt) rotate(0deg);
}
40% {
transform: translate(1pt, -1pt) rotate(1deg);
}
50% {
transform: translate(-1pt, 2pt) rotate(-1deg);
}
60% {
transform: translate(-3pt, 1pt) rotate(0deg);
}
70% {
transform: translate(3pt, 1pt) rotate(-1deg);
}
80% {
transform: translate(-1pt, -1pt) rotate(1deg);
}
90% {
transform: translate(1pt, 2pt) rotate(0deg);
}
100% {
transform: translate(1pt, -2pt) rotate(-1deg);
}
}