-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.css
107 lines (107 loc) · 1.71 KB
/
main.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
:root{
--bgcol:#333;
--textPri: #fff;
--textSec: #666;
--priCol:#fd4;
}
body{
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: var(--bgcol);
color: var(--textPri);
font-size: 1.2rem;
}
main{
display: flex;
justify-content: center;
flex-direction: column;
flex-wrap: wrap;
align-items: center;
align-content: center;
}
h1{
color: var(--priCol);
}
#header{
display: flex;
width:60%;
justify-content: space-between;
margin: 20px 0;
}
#buttons{
text-align: right;
}
#info{
color: var(--priCol);
margin: 5px 5px;
}
button{
background: rgba(255,255,255,.2);
border-radius: 5px;
border: 0;
padding: 10px 20px;
color: rgba(255,255,255,.5);
cursor: pointer;
}
#game{
line-height: 30px;
height: 90px;
overflow: hidden;
position: relative;
display: flex;
width:60%
}
#game:focus #words{
filter: blur(0);
}
#words{
filter: blur(3px);
}
#game:focus #focus-error{
display: none;
}
#focus-error{
position: absolute;
inset: 0;
text-align: center;
padding-top: 30px;
}
div.word{
display: inline-block;
margin: 0 5px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: var(--textSec);
}
.letter.correct{
color: #fff;
}
.letter.incorrect{
color: #f55;
}
@keyframes blink{
0%{opacity: 1;}
50%{opacity: 0;}
100%{opacity: 1;}
}
#cursor{
width: 2px;
height: 1.4rem;
background-color: var(--priCol);
position: fixed;
top: 165px;
left: 11px;
animation: blink .7s infinite ;
display: none;
}
#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;
}