-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
139 lines (113 loc) · 2.01 KB
/
style.css
File metadata and controls
139 lines (113 loc) · 2.01 KB
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
138
139
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
:root {
--bgColor: #90F;
--textPrimary: #fff;
--textSecondary: rgb(169, 197, 197);
--primaryColor: #fff;
}
body {
font-family: 'Roboto', sans-serif;
background-color: var(--bgColor);
color: var(--textPrimary);
font-size: 1.4rem;
}
main {
width: 600px;
margin: 50px auto;
}
h1 {
color: var(--primaryColor);
text-align: center;
}
h1 svg {
width: 40px;
fill: var(--primaryColor);
}
#main-card {
margin: auto;
}
#header {
display: grid;
grid-template-columns: 1fr 1fr;
margin: 20px 6px 30px;
}
#buttons {
text-align: right;
}
button {
background: rgb(255, 255, 255);
border: 0;
padding: 5px 20px;
border-radius: 20px;
cursor: pointer;
}
div#game {
line-height: 35px;
height: 105px;
overflow: hidden;
position: relative;
}
div#game:focus {
outline: 0;
}
#words {
filter: blur(5px);
color: var(--textSecondary);
}
#game:focus #words {
filter: blur(0);
}
#focus-error {
position: absolute;
inset: 0;
text-align: center;
padding-top: 35px;
}
#game:focus #focus-error {
display: none;
}
div.word {
display: inline-block;
font-family: 'Roboto Mono', monospace;
margin: 0 5px;
}
.letter.correct {
color: #fff;
}
.letter.incorrect {
color: #f55;
}
@keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#cursor {
display: none;
width: 2px;
height: 1.6rem;
background: var(--primaryColor);
position: fixed;
top: 191px;
left: 12px;
animation: blink .3s infinite;
}
#game:focus #cursor {
display: block;
}
#game.over #words {
opacity: .5;
filter: blur(0px);
}
#game.over:focus #cursor {
display: none;
}
#game.over #focus-error {
display: none;
}