forked from surbhibansal/hello-worldle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.css
132 lines (114 loc) · 2.34 KB
/
index.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
body {
background-color: black;
color: white;
font-family: 'Poppins', serif;
}
.hello_worldle {
padding: 0.5rem;
}
.hello_worldle__grid {
justify-content: center;
display: grid;
gap: 5px;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(6, 53px);
max-width: 1000px;
margin: 0 auto;
}
.hello_worldle__grid__item {
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
border: 1px solid white;
}
.hello_worldle__info {
font-size: 1rem;
text-align: center;
position: absolute;
display: none;
top: 30vh;
left: 30vw;
background-color: darkgray;
color: black;
padding: 1rem;
}
.hello_worldle__keypad {
justify-content: center;
display: grid;
margin-top: 0.5rem;
grid-template-columns: repeat(20, 15px);
grid-template-rows: repeat(3, 70px);
gap: 5px;
font-weight: bolder;
}
.hello_worldle__keypad__key {
display: flex;
align-items: center;
justify-content: center;
background-color: lightslategray;
cursor: pointer;
font-size: 1.3rem;
}
.shake-animation {
animation: horizontal-shake 1s;
}
.incorrect-letter-animation {
transition-property: background-color;
transition-duration: 200ms;
transition-timing-function: ease-in-out;
background-color: rgb(107 104 104);
}
.incorrect-position-animation {
transition-property: background-color;
transition-duration: 200ms;
transition-timing-function: ease-in-out;
background-color: rgb(194 170 12);
}
.correct-position-animation {
transition-property: background-color;
transition-duration: 200ms;
transition-timing-function: ease-in-out;
background-color: #359c35;
}
@keyframes horizontal-shake {
0% {
transform: translateX(0)
}
25% {
transform: translateX(5px)
}
50% {
transform: translateX(-5px)
}
75% {
transform: translateX(5px)
}
100% {
transform: translateX(0)
}
}
@keyframes incorrect-letter {
from {
background-color: black;
}
to {
background-color: rgb(107 104 104);
}
}
@keyframes incorrect-position {
from {
background-color: black;
}
to {
background-color: rgb(194 170 12);
}
}
@keyframes correct-position {
from {
background-color: black;
}
to {
background-color: #359c35;
}
}