forked from KirkMcDonald/kirkmcdonald.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calc.css
407 lines (402 loc) · 8.09 KB
/
calc.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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
:root {
/* main background, dropdown backgrounds */
--dark: #171717;
/* tooltip background; should be same as dark, but with alpha channel */
--dark-overlay: rgba(23, 23, 23, 0.8);
/* visualization node backgrounds, button backgrounds */
--medium: #212427;
/* background of main visual area */
--main: #272b30;
/* input field backgrounds, collapsed dropdown borders */
--light: #3a3f44;
/* main foreground text color */
--foreground: #c8c8c8;
/* makes things stand out */
--accent: #ff7200;
/* slightly brighter than main foreground color */
--bright: #f1fff2;
}
/* top-level/shared elements */
body {
font-family: sans-serif;
color: var(--foreground);
background-color: var(--dark);
}
a {
text-decoration: none;
color: var(--accent);
}
a:active, a:hover {
color: var(--bright);
}
input, select {
color: var(--foreground);
background-color: var(--light);
padding: 0.25em;
border: 1px solid var(--light);
border-radius: 0.4em;
}
input:focus, select:focus {
border-color: var(--accent);
outline: none;
}
.right-align {
text-align: right;
}
button.ui {
color: var(--accent);
background: linear-gradient(to bottom, var(--light), var(--medium));
border: 2px outset var(--light);
border-radius: 0.4em;
cursor: pointer;
}
button.ui:active {
border-style: inset;
}
button.ui:focus {
border-color: var(--accent);
outline: none;
}
button#debug_button {
float: right;
}
img.icon {
background-repeat: no-repeat;
display: inline-block;
height: 32px;
width: 32px;
vertical-align: middle;
}
/* "recent changes" box */
.changecell {
vertical-align: top;
}
.changebox {
margin-left: 3em;
padding: 1em;
border: 2px solid var(--bright);
font-family: monospace;
}
/* tooltips */
div.tooltip {
opacity: 1;
z-index: 20;
}
div.tooltip .frame {
border: 2px solid var(--bright);
border-radius: 5px;
background-color: var(--dark-overlay);
padding: 0.4em;
text-align: left;
opacity: 1;
z-index: 20;
}
div.tooltip h3 {
margin: 0;
}
div.tooltip h3:not(:last-child) {
margin-bottom: 0.5em;
}
div.tooltip div.product {
position: relative;
display: inline-block;
background-color: var(--light);
margin-top: 5px;
}
div.tooltip div.product span.count {
position: absolute;
right: 1px;
bottom: 1px;
font-size: 12px;
font-family: monospace;
color: var(--bright);
text-shadow: -1px -1px 0px var(--dark), -1px 1px 0px var(--dark), 1px -1px 0px var(--dark), 1px 1px 0px var(--dark);
}
div.tooltip img.ingredient {
background-color: var(--light);
}
/* build targets */
.targetButton {
height: 2em;
width: 2em;
padding: 0;
text-align: center;
font-weight: bold;
font-family: sans-serif;
margin-right: 0.5em;
}
ul.targets {
list-style-type: none;
margin-top: 0;
}
ul.targets li {
margin: 0.25em;
border-radius: 0.5em;
}
ul.targets a {
font-size: large;
font-weight: bold;
cursor: pointer;
}
label.selected {
font-weight: bold;
color: var(--bright);
}
/* settings */
.setting-label {
text-align: right;
vertical-align: middle;
}
.middle {
align-self: center;
}
.top {
vertical-align: top;
}
input.prec, input.length {
width: 4em;
}
input.mprod {
width: 4em;
}
/* factories tab */
input.beacon {
width: 4em;
}
#totals {
border-collapse: collapse;
}
tr.display-row td.pad, th.pad {
padding-left: 1em;
}
tr.display-row img.recipe-icon {
cursor: pointer;
}
tr.display-row td.pad-right {
padding-right: 1em;
}
tr.display-row .dropdown, tr.display-row .dropdown + .spacer {
margin-left: 5px;
margin-right: 5px;
}
tr.display-row .dropdown + .spacer {
padding-left: 2px;
padding-right: 2px;
}
tr.display-row td, tr.factory-header th {
padding-top: 8px;
padding-bottom: 8px;
}
tr.recipe-row td, tr.group-top-row td, tr.power-row td {
border-top: 1px solid var(--light);
}
tr.group-row td.leftmost {
border-left: 1px solid var(--light);
}
tr.ignore img.display {
opacity: 0.2;
}
tr.no-mods td.module * {
display: none;
}
td.waste-hide, th.waste-hide {
display: none;
}
span.displaylink {
font-size: x-small;
}
tr.display-row button.copy {
padding: 0px;
height: 32px;
}
/* items tab */
input.pipe {
width: 4em;
}
input.pipeLength {
width: 5em;
}
svg.popout {
color: var(--accent);
width: 16;
height: 16;
}
/* breakdown */
.breakdown-open .breakdown-arrow {
transform: rotate(90deg);
}
.breakdown-arrow {
color: var(--foreground);
cursor: pointer;
transition: transform 0.25s;
}
.breakdown-arrow:hover {
color: var(--accent);
}
.breakdown {
display: none;
height: 0;
}
.breakdown.breakdown-open {
display: table-row;
height: auto;
transition: height 0.25s;
}
.breakdown table {
border-collapse: collapse;
border-left: solid 0.5em var(--medium);
border-right: solid 0.5em var(--medium);
background: var(--medium);
border-radius: 0.25em;
}
.usage-arrow {
vertical-align: middle;
}
.breakdown-last-input td {
border-bottom: 1px solid var(--light);
}
/* tabs */
div.tabs {
overflow: hidden;
}
div.tabs button.tab_button {
color: var(--accent);
background-color: inherit;
border-top-left-radius: 0.25em;
border-top-right-radius: 0.25em;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 0.5em;
}
div.tabs button.tab_button:hover {
background-color: var(--medium)
}
div.tabs button.active, div.tabs button.active:hover {
color: var(--bright);
background-color: var(--main);
}
div.tab {
display: none;
padding: 1em;
background-color: var(--main);
}
/* visualizer settings */
#graph-wrapper {
display: grid;
grid-template-columns: minmax(auto, max-content) minmax(auto, max-content);
gap: 1em 0.5em;
}
#graph-wrapper .graph-button {
grid-row: 1 / 2;
color: var(--accent);
cursor: pointer;
}
#graph-wrapper .graph-button-span:hover {
color: var(--bright);
}
#graph-wrapper .graph-button .gear {
vertical-align: middle;
}
#graph-wrapper .graph-button-span::after {
content: "\300B";
font-size: 20px;
vertical-align: middle;
}
#graph-wrapper.open .graph-button-span::after {
content: "\300A";
}
#graph-wrapper .graph-setting-box {
display: none;
padding: 0.5em;
border: 2px solid var(--accent);
border-radius: 5px;
}
#graph-wrapper.open .graph-setting-box {
grid-row: 1 / 3;
grid-column: 1 / 2;
display: block;
}
#graph-wrapper.open .graph-settings {
display: grid;
grid-template-columns: minmax(auto, max-content) minmax(auto, max-content);
grid-template-rows: minmax(auto, max-content) minmax(auto, max-content);
gap: 1em 0.5em;
}
#graph-wrapper .graph-content {
grid-row: 2 / 3;
}
/* visualizer */
g.node rect {
stroke-width: 1px;
}
g.overlay rect {
cursor: pointer;
}
g.node .colon {
stroke: none;
fill: var(--foreground);
}
rect.nodeHighlight {
stroke: var(--accent);
}
g.edgePathHighlight .highlighter {
stroke: var(--accent);
}
svg.sankey g.edgePathHighlight .highlighter {
stroke-opacity: 0.7;
}
g.edgePathHighlight rect.highlighter {
fill-opacity: 1;
}
g.edgePathFuel path {
stroke-dasharray: 10,5;
}
text {
stroke: none;
fill: var(--foreground);
}
svg.sankey text {
font: 12px sans-serif;
}
div.graph {
min-width: max-content;
min-width: -moz-max-content;
}
/* about */
.about-content {
max-width: 40em;
}
.about-content h3 {
color: var(--bright);
}
/* dropdowns */
.dropdownWrapper .dropdown .search {
display: none;
width: 100%;
padding-left: 0.4em;
margin-bottom: 0.4em;
}
.dropdownWrapper.open .dropdown .search {
display: block;
}
.dropdownWrapper.open div.itemDropdown {
height: 400px;
width: 380px;
overflow-y: scroll;
transition: height 0.3s;
}
/* debug */
#debug_tab table td.zero-out {
background-color: var(--dark);
}
#debug_tab table td.ignore {
color: var(--accent);
}
/* footer */
#footer {
border-top: 3px solid var(--accent);
padding-top: 2px;
background-color: var(--medium);
}