-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
147 lines (122 loc) Β· 2.44 KB
/
styles.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
138
139
140
141
142
143
144
145
146
147
@charset 'utf-8';
@import url('//brick.a.ssl.fastly.net/Vollkorn:500');
* { border: none; margin: 0; font-weight: inherit; text-decoration: inherit;
outline: none; padding: 0; font-family: inherit; font-size: 1em; }
/* Colours for now: http://ethanschoonover.com/solarized */
body {
font-family: Vollkorn, serif;
font-size: 20px;
text-align: center;
background: #073642;
color: #EEE8D5;
display: flex;
height: 100vh;
flex-direction: column;
justify-content: space-between;
}
::-moz-selection { background: #002B36; color: currentColor; }
::selection { background: #002B36; color: currentColor; }
a {
color: currentColor;
}
h1, nav {
padding: .5rem;
font-size: .8rem;
}
#game #word {
font-size: 4rem;
line-height: 1em;
}
#game input {
display: none;
}
#game input + label {
border: solid .2rem currentColor;
display: inline-block;
width: 5rem;
height: 5rem;
line-height: 5rem;
text-align: center;
font-size: 2rem;
cursor: pointer;
margin: 3rem 1rem;
vertical-align: baseline;
transition: all .2s;
}
#game input#n + label {
border-radius: 50%;
}
#game input#t + label {
width: 4.5rem;
height: 4.5rem;
line-height: 4.5rem;
}
#game input:hover + label,
#game input:focus + label
#game input + label:hover {
transform: scale(1.05);
}
#game input:checked + label {
transform: scale(1.05);
background: black;
position: relative;
}
#game input[data-answer='wrong']:checked + label {
border-color: #DC322F;
background: #DC322F;
}
#game input[data-answer='right']:checked + label {
border-color: #859900;
background: #859900;
}
@keyframes result {
0% {
transform: translatey(0);
opacity: 0;
}
50% {
opacity: 1;
}
100% {
transform: translatey(-1rem);
opacity: 0;
}
}
#game input:checked + label:after {
position: absolute;
top: -60%;
left: -2em;
right: -2em;
font-size: .8rem;
text-transform: uppercase;
text-align: center;
pointer-events: none;
animation: result 1s forwards;
}
#game input[data-answer='wrong']:checked + label:after {
content: 'Forkert';
color: #DC322F;
}
#game input[data-answer='right']:checked + label:after {
content: 'Korrekt';
color: #859900;
}
#next {
background: #002B36;
cursor: pointer;
padding: 1rem 2rem;
color: currentColor;
transition: all .2s;
}
#next:hover,
#next:focus {
transform: scale(1.05);
outline: 0;
}
#next.hidden {
opacity: 0;
pointer-events: none;
}
#next:not(.hidden) {
transition: opacity .4s .5s, transform .2s;
}