-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.css
137 lines (112 loc) · 2.02 KB
/
app.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/* ======= ALL ====== */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #394880;
height: 100vh;
}
/* ======= CONTAINER ====== */
.container {
margin: 0 auto;
text-align: center;
padding: 2.5rem;
max-width: 1000px;
}
.container h1 {
color: white;
}
.container h1 span {
color: rgb(255, 208, 0);
}
.container input {
outline: none;
border: none;
padding: 0.5rem 1rem;
border-radius: 1rem;
font-size: 1rem;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
width: 100%;
}
#searchWrapper {
position: relative;
width: 80%;
margin: 2rem auto;
}
#searchWrapper::after {
content: '🔍';
position: absolute;
top: 5px;
right: 15px;
}
/* ======= LIST ====== */
#charactersList {
padding-inline-start: 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
}
.character {
list-style-type: none;
background-color: white;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
border-radius: 0.5rem;
padding: 0.635rem 1.25rem;
display: grid;
grid-template-columns: 3fr 1fr;
grid-template-areas:
'name image'
'house image'
'birth image'
'ancestry image'
'patronus image';
text-align: left;
}
/* === animation === */
.character:hover {
animation: move 0.5s;
}
@keyframes move {
0% {
transform: translateY(0px);
}
50% {
transform: translateY(-15px);
}
100% {
transform: translateY(0px);
}
}
.character > h2 {
grid-area: name;
color: #394880;
}
.character > house {
grid-area: house;
}
.character > birth {
grid-area: birth;
}
.character > ancestry {
grid-area: ancestry;
}
.character > patronus {
grid-area: patronus;
}
.character > img {
grid-area: image;
max-height: 100px;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
/* ======= MOBILE ====== */
@media (max-width: 400px) {
.container {
padding: 2.5rem 1.5rem;
}
#charactersList {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
}