-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
104 lines (104 loc) · 2.35 KB
/
style.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
@font-face {
font-family: 'monogram';
src: url('assets/monogram-extended.ttf') format('truetype');
}
.canvas-wrapper {
position: relative;
width: 100%;
height: var(--playsize, 80vmin);
margin-bottom: 10px;
border: 2px solid white;
}
.canvas-wrapper canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
image-rendering: pixelated;
image-rendering: crisp-edges;
}
.game-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: var(--playsize, 80vmin);
}
.input-container {
display: inline-flex;
width: 100%;
}
.input-container * {
color: white;
font-size: 1.2em;
font-family: 'monogram';
}
.textbox-container {
display: table-cell;
width: 100%;
padding-right: 0.4em;
}
.textbox-container > input {
background: black;
border: 2px solid;
width: 100%;
font-size: 0.8em;
padding: 5px;
}
.input-container > button {
background: none;
border: 2px solid;
transition: transform .2s;
margin-right: -4px;
margin-left: 10px;
}
.input-container > button:hover {
transform: scale(1.05);
}
.input-container > button:active {
transform: scale(0.9);
}
.input-error {
border-color: red !important;
animation: shake 0.5s;
animation-iteration-count: 1;
}
.textbox-container > input:focus {
box-shadow: none;
outline: none;
}
.textbox-container > input:focus:not(.input-error) {
animation: shrinkgrow 0.5s;
animation-iteration-count: 1;
}
.input-container > button:focus {
outline: none;
}
@keyframes shake {
0% { transform: translate( 1px, 0px); }
10% { transform: translate(-1px, 0px); }
20% { transform: translate(-3px, 0px); }
30% { transform: translate( 3px, 0px); }
40% { transform: translate( 1px, 0px); }
50% { transform: translate(-1px, 0px); }
60% { transform: translate(-3px, 0px); }
70% { transform: translate( 3px, 0px); }
80% { transform: translate(-1px, 0px); }
90% { transform: translate( 1px, 0px); }
100% { transform: translate( 1px, 0px); }
}
@keyframes shrinkgrow {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
body {
color: white;
background: black;
overflow: hidden;
font-family: monogram;
font-size: 2em;
}
html, body {
height: 100%;
}