-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
370 lines (306 loc) · 5.48 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
/* General styles toggle theme mode */
:root {
--peach-orange: hsl(34, 62%, 76%);
--black: hsl(0, 0%, 0%);
--darker-grey: hsl(200, 17%, 79%);
--dark-blue: hsl(225, 31%, 27%);
--brown: hsl(14, 7%, 55%);
--indian-red: hsl(354, 34%, 44%);
}
* {
letter-spacing: 1px;
margin: 0;
padding: 0;
}
body {
color: var(--dark-blue);
font-weight: 600;
font-family: 'Carter One', cursive;
}
body,
.overlay {
background-color: var(--black);
}
.main-flex-wrapper {
flex-direction: column;
}
.flex-wrapper h1,
p {
margin: 5%;
}
.main-flex-wrapper,
.menu-panel,
.panel-left,
.panel-right,
.flex-wrapper {
display: flex;
align-items: center;
}
/* Menu panel with buttons at top of screen where the game is controlled */
.menu-panel {
justify-content: space-between;
}
.menu-panel h1,
.logo {
margin-left: 15%;
}
.menu-panel,
button[type=submit] {
background-color: var(--dark-blue);
}
.menu-panel button {
border: none;
cursor: pointer;
padding: 10px;
}
.flex-wrapper,
.menu-panel button,
.rules,
.menu-panel button,
#word-box {
background-color: var(--peach-orange);
}
.menu-panel button,
button {
font-size: 1rem;
}
.panel-right {
margin-right: 2%;
}
.logo {
width: 60px;
}
.logo,
#hangman-img {
height: auto;
}
.main-title,
#end-round-text,
.sidebar #close-btn {
font-size: 2.3rem;
}
.main-title,
.menu-panel button,
#previous-guesses,
.credits,
a {
color: var(--indian-red);
}
/* Inside 'main flex wrapper': contains main content / sections */
h3,
.flex-wrapper,
.rules,
.word-info-display,
.image {
margin: 2% 5%;
}
.rules,
.word-info-display {
line-height: 1.8;
padding: 15px;
}
.flex-wrapper,
.rules,
#hangman-img {
border: 5px solid var(--dark-blue);
}
.flex-wrapper,
.rules,
.word-info-display,
#hangman-img,
#word-box,
button,
input {
border-radius: 15px;
}
.rules {
padding: 30px;
width: 50%;
}
#hangman-img {
height: 350px;
width: 250px;
}
span {
font-size: 2.1rem;
}
/* This is the area that the random word appears in */
.word-container {
margin: 2.5% 0 3.8% 0;
}
#word-box {
display: inline;
}
/* Class applied to word via JS when once generated */
.word-border {
border: 5px solid var(--dark-blue);
}
/* Letters of the hangman game inside word box - hidden until guessed */
.letter {
border-bottom: 2px solid var(--dark-blue);
margin: 10px 15px;
visibility: hidden;
}
/* Class applied with JS that reveals the letter on correct guess */
.letter-reveal {
visibility: visible;
}
/* Main button and input styles */
button,
.overlay p {
padding: 8px;
}
button,
input {
font-family: 'Fredoka One', cursive;
margin: 15px;
}
button {
border: none;
cursor: pointer;
width: 120px;
}
input {
border: 3px solid var(--brown);
}
.credits,
.overlay p,
input,
.word-info-display {
font-size: 1.3rem;
}
.menu-panel button:active {
box-shadow: inset 0 0 0 3px var(--peach-orange);
}
button[type=submit]:active {
box-shadow: inset 0 0 0 3px var(--brown);
}
.menu-panel button:active,
button[type=submit]:active {
outline: none;
}
input,
.word-border,
button[type=submit] {
padding: 15px;
width: 110px;
}
h3,
#show-category,
#word-info,
input,
.sidebar,
.word-container,
.overlay {
text-align: center;
}
.overlay,
.sidebar h2,
.sidebar button,
.sidebar #close-btn,
.menu-panel button:hover,
.menu-panel button:focus,
button[type=submit] {
color: var(--peach-orange);
}
.menu-panel button:hover,
.menu-panel button:focus,
button[type=submit]:hover,
button[type=submit]:focus,
.sidebar button {
background-color: var(--indian-red);
}
button:hover:not([type=submit], .menu-panel button),
button:focus:not([type=submit], .menu-panel button) {
transform: scale(1.1);
}
/* Sidebar containing category select */
.sidebar {
bottom: 0;
overflow-x: hidden;
padding-top: 50px;
right: 0;
top: 0;
transition: 0.8s;
width: 0;
border-left: 4px solid var(--dark-blue);
}
.sidebar,
.overlay {
background-color: var(--black);
position: fixed;
z-index: 1;
}
.sidebar h2,
.sidebar button {
padding: 15px;
}
.sidebar h2,
.sidebar button,
.overlay {
text-shadow: 2px 2px 20px var(--peach-orange);
}
.sidebar h2 {
margin-top: 15px;
}
.sidebar button {
margin: 18px 0;
transition: 0.6s;
width: 150px;
}
.sidebar #close-btn {
left: 25px;
position: absolute;
top: 15px;
}
/* Class applied to the sidebar via JS that when toggling on and off */
.sidebar-active {
width: 250px;
}
/* Overlay that is displayed on game over or when round is won */
.overlay,
.overlay-content {
width: 100%;
}
.overlay {
height: 0;
left: 0;
opacity: 0.9;
overflow-y: hidden;
top: 0;
transition: 3s;
}
.overlay-content {
margin-top: 30px;
position: relative;
top: 10%;
}
.overlay p {
transition: 0.3s;
}
/* Classes that open and close the overlay - applied with JS */
.overlay-slide-in {
height: 100%;
}
.overlay-slide-out {
height: 0;
}
/* Media breakpoints */
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
.sidebar {
padding-top: 15px;
}
.sidebar a {
font-size: 1.125rem;
}
}
/* Some text and overflow tweaks for a smaller screen */
@media screen and (max-height: 450px) {
.overlay {
overflow-y: auto;
}
.overlay p {
font-size: 1.25rem;
}
}