-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.css
134 lines (107 loc) · 2.34 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
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
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
#game_container {
display: grid;
grid-template-rows: auto max-content;
grid-template-columns: auto;
grid-template-areas:
"map"
"controls";
background: black;
width: 100vw;
height: 100vh;
}
#game_map {
grid-area: map;
/* When combined with "position: absolute;" in the canvas,
* this makes canvas sizing work correctly. */
position: relative;
}
#game_canvas {
position: absolute;
width: 100%;
height: 100%;
}
#game_overlay {
position: absolute;
left: 1em;
top: 1em;
background-color: rgb(60, 255, 0);
border: 2px solid rgb(28, 121, 0);
border-radius: 0.5em;
font-size: 16pt;
padding: 0.5em;
}
#game_overlay:empty {
display: none;
}
#game_controls {
grid-area: controls;
display: flex;
padding-left: 1em;
padding-right: 1em;
padding-top: 0.3em;
padding-bottom: 0.3em;
align-items: center;
background-color: #555;
font-family: "Courier New", "Liberation Mono", monospace;
font-size: 16pt;
}
#game_controls > * {
height: 100%;
margin-right: 0.5em;
}
#game_controls label {
padding-left: 0.5em;
border-radius: 3px;
color: white;
background-color: #777;
}
#game_controls label#current_player {
display: flex;
align-items: center;
padding-right: 0.5em;
}
#game_controls label#current_player:empty {
display: none;
}
#game_controls label#current_player:before {
background-color: var(--player-color);
content: "";
display: inline-block;
margin-right: 0.5em;
width: 1em;
height: 1em;
border-radius: 0.5em;
vertical-align: middle;
}
#game_controls input {
font-family: inherit;
font-size: inherit;
padding: 0.2em;
}
#game_controls input[type=number] {
border: 1px solid #333;
border-radius: 3px;
background-color: #eee;
text-align: right;
}
#game_controls input[type=number]:focus {
border-color: rgb(0, 174, 255);
}
#game_controls input[type=number]:invalid {
border-color: rgb(255, 102, 0);
}
#game_controls input[type=number][disabled] {
background-color: #999;
}
#game_controls input[type=submit] {
padding-left: 0.5em;
padding-right: 0.5em;
border-radius: 3px;
border: 1px solid #333;
background-color: rgb(255, 102, 0);
}