Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
polakowo
GitHub Repository: polakowo/vectorbt
Path: blob/master/apps/candlestick-patterns/assets/style.css
1148 views
1
/* =========================
2
Modern UI theme (Dash + DBC)
3
========================= */
4
5
:root {
6
--bg: #ffffff;
7
--bg-muted: #f6f7fb;
8
--surface: #ffffff;
9
--surface-2: #fbfbfd;
10
11
--text: #0f172a;
12
--text-muted: #475569;
13
--text-subtle: #64748b;
14
15
--border: #e5e7eb;
16
--border-strong: #d1d5db;
17
18
/* Active */
19
--primary: #2563EB;
20
--primary-700: #1D4ED8;
21
22
/* RGB triples (for rgba usage) */
23
--ink-rgb: 15, 23, 42;
24
--primary-rgb: 37, 99, 235;
25
26
/* Surfaces */
27
--primary-tint: #EFF6FF;
28
--primary-tint-2: #DBEAFE;
29
30
--shadow-sm: 0 1px 2px rgba(var(--ink-rgb), 0.06);
31
--shadow-md: 0 10px 25px rgba(var(--ink-rgb), 0.08);
32
33
/* Radius (reduced + standardized) */
34
--radius-sm: 8px;
35
--radius-md: 12px;
36
--radius-pill: 999px;
37
38
/* Optional: use for tight focus rounding */
39
--radius-focus: 10px;
40
41
--focus: 0 0 0 3px rgba(var(--primary-rgb), 0.20);
42
43
/* Common alpha accents */
44
--primary-a35: rgba(var(--primary-rgb), 0.35);
45
--primary-a55: rgba(var(--primary-rgb), 0.55);
46
--primary-a85: rgba(var(--primary-rgb), 0.85);
47
}
48
49
* { box-sizing: border-box; }
50
51
body {
52
margin: 0;
53
padding: 16px 20px;
54
background: var(--bg-muted);
55
color: var(--text);
56
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
57
line-height: 1.35;
58
overflow-x: hidden;
59
}
60
61
@media (max-width: 576px) {
62
body { padding: 12px 12px; }
63
}
64
65
._dash-undo-redo { display: none; }
66
67
.container.scalable,
68
.container-fluid.scalable {
69
width: 100%;
70
max-width: none;
71
}
72
73
/* App shell spacing */
74
.app-shell {
75
max-width: 1400px;
76
margin: 0 auto;
77
}
78
79
/* =========================
80
Top app header
81
========================= */
82
83
.app-shell .app-banner {
84
display: flex;
85
align-items: center;
86
justify-content: space-between;
87
gap: 16px;
88
89
padding: 14px 16px;
90
margin: 6px 0 14px;
91
92
background: var(--surface);
93
border: 1px solid var(--border);
94
border-radius: var(--radius-md);
95
box-shadow: var(--shadow-sm);
96
}
97
98
.app-shell .app-banner h6 {
99
margin: 0;
100
font-size: 16px;
101
font-weight: 800;
102
letter-spacing: 0.08em;
103
text-transform: uppercase;
104
color: var(--text);
105
}
106
107
/* GitHub link styled like pill button */
108
.app-shell .btn-link {
109
display: inline-flex;
110
align-items: center;
111
justify-content: center;
112
113
padding: 9px 12px;
114
border-radius: var(--radius-pill);
115
border: 1px solid var(--border);
116
background: var(--surface-2);
117
color: var(--text-muted);
118
text-decoration: none;
119
font-weight: 700;
120
font-size: 13px;
121
122
transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
123
}
124
125
.app-shell .btn-link:hover {
126
color: var(--primary);
127
border-color: var(--primary-a35);
128
background: var(--primary-tint);
129
transform: translateY(-1px);
130
}
131
132
.app-shell .btn-link:focus-visible {
133
outline: none;
134
box-shadow: var(--focus);
135
}
136
137
/* =========================
138
Cards / containers
139
========================= */
140
141
.app-shell .pretty-container {
142
margin: 14px 0;
143
padding: 16px;
144
background: var(--surface);
145
border: 1px solid var(--border);
146
border-radius: var(--radius-md);
147
box-shadow: var(--shadow-md);
148
}
149
150
.app-shell .card-header {
151
display: flex;
152
align-items: center;
153
justify-content: space-between;
154
155
margin: -2px 0 10px;
156
padding: 8px 0;
157
158
border-bottom: 1px solid var(--border);
159
}
160
161
.app-shell .card-header h6 {
162
margin: 0;
163
font-size: 15px;
164
font-weight: 800;
165
letter-spacing: 0.06em;
166
text-transform: uppercase;
167
color: var(--text);
168
}
169
170
/* Labels + small text */
171
.app-shell label {
172
font-size: 14px;
173
font-weight: 700;
174
color: var(--text-muted);
175
margin-top: 6px;
176
display: inline-block;
177
}
178
179
.app-shell small {
180
color: var(--text-subtle);
181
}
182
183
/* =========================
184
Buttons (opt-in via .btn-neutral)
185
========================= */
186
187
.app-shell .btn-neutral {
188
appearance: none;
189
display: inline-flex;
190
align-items: center;
191
justify-content: center;
192
vertical-align: middle;
193
194
height: 34px;
195
padding: 0 12px;
196
border-radius: var(--radius-sm);
197
border: 1px solid var(--border);
198
background: var(--surface-2);
199
color: var(--text-muted);
200
201
font-weight: 700;
202
font-size: 14px;
203
box-shadow: var(--shadow-sm);
204
205
transition: border-color 120ms ease, color 120ms ease, background 120ms ease, transform 120ms ease;
206
}
207
208
.app-shell .btn-neutral:hover {
209
color: var(--primary);
210
border-color: var(--primary-a35);
211
background: var(--primary-tint);
212
transform: translateY(-1px);
213
}
214
215
.app-shell .btn-neutral:focus-visible {
216
outline: none;
217
box-shadow: var(--focus);
218
}
219
220
.app-shell .button-row {
221
display: flex;
222
gap: 8px;
223
flex-wrap: wrap;
224
margin-bottom: 10px;
225
}
226
227
.app-shell .field-label {
228
display: block;
229
margin-top: 10px;
230
}
231
232
/* =========================
233
Inputs / Dropdowns
234
========================= */
235
236
.app-shell .input-control,
237
.app-shell input[type="text"],
238
.app-shell input[type="number"] {
239
width: 100%;
240
height: 38px;
241
padding: 6px 10px;
242
243
background: var(--surface-2);
244
color: var(--text);
245
border: 1px solid var(--border);
246
border-radius: var(--radius-md);
247
box-shadow: none;
248
font-size: 14px;
249
}
250
251
.app-shell .input-control:focus-visible,
252
.app-shell input[type="text"]:focus-visible,
253
.app-shell input[type="number"]:focus-visible {
254
outline: none;
255
border-color: var(--primary-a55);
256
box-shadow: var(--focus);
257
}
258
259
/* Dash Dropdown legacy react-select v1 */
260
.app-shell .Select-control {
261
min-height: 38px;
262
background: var(--surface-2);
263
border: 1px solid var(--border);
264
border-radius: var(--radius-md);
265
box-shadow: none;
266
}
267
268
.app-shell .Select.is-focused .Select-control {
269
border-color: var(--primary-a55);
270
box-shadow: var(--focus);
271
}
272
273
.app-shell .Select-placeholder,
274
.app-shell .Select-value-label {
275
color: var(--text-subtle);
276
font-size: 14px;
277
}
278
279
/* Dash Dropdown newer react-select hooks (future/variant-safe) */
280
.app-shell .Select__control {
281
min-height: 38px;
282
background: var(--surface-2);
283
border: 1px solid var(--border);
284
border-radius: var(--radius-md);
285
box-shadow: none;
286
}
287
288
.app-shell .Select__control--is-focused {
289
border-color: var(--primary-a55);
290
box-shadow: var(--focus);
291
}
292
293
.app-shell .Select__placeholder,
294
.app-shell .Select__single-value,
295
.app-shell .Select__input-container {
296
color: var(--text-subtle);
297
font-size: 14px;
298
}
299
300
/* Menu */
301
.app-shell .Select-menu-outer,
302
.app-shell .Select__menu {
303
background: var(--surface);
304
color: var(--text);
305
border: 1px solid var(--border);
306
border-radius: var(--radius-md);
307
box-shadow: var(--shadow-md);
308
overflow: hidden;
309
}
310
311
.app-shell .Select-option,
312
.app-shell .Select__option {
313
font-size: 14px;
314
}
315
316
.app-shell .Select-option:hover,
317
.app-shell .Select__option--is-focused {
318
background: var(--primary-tint);
319
color: var(--primary);
320
cursor: pointer;
321
}
322
323
/* Hide clear X (legacy) */
324
.app-shell span.Select-clear-zone { display: none; }
325
326
/* =========================
327
Details/Summary styling (lighter, less “box in a box”)
328
========================= */
329
330
.app-shell details {
331
background: var(--surface-2);
332
border: 1px solid var(--border);
333
border-radius: var(--radius-md);
334
padding: 10px 12px;
335
margin-top: 10px;
336
}
337
338
.app-shell details + details {
339
margin-top: 12px;
340
}
341
342
.app-shell summary.section-title {
343
list-style: none;
344
cursor: pointer;
345
user-select: none;
346
347
font-size: 14px;
348
font-weight: 800;
349
color: var(--text);
350
letter-spacing: 0.04em;
351
352
display: flex;
353
align-items: center;
354
justify-content: space-between;
355
gap: 10px;
356
357
padding: 6px 2px;
358
}
359
360
.app-shell summary.section-title::-webkit-details-marker { display: none; }
361
362
.app-shell summary.section-title:focus-visible {
363
outline: none;
364
box-shadow: var(--focus);
365
border-radius: var(--radius-focus);
366
}
367
368
/* =========================
369
RangeSlider
370
========================= */
371
372
.app-shell .rc-slider { margin-top: 10px; }
373
374
.app-shell .rc-slider-rail { background: var(--primary-tint-2); }
375
376
.app-shell .rc-slider-track { background: var(--primary-a85); }
377
378
.app-shell .rc-slider-handle,
379
.app-shell .rc-slider-dot-active {
380
border-color: var(--primary-a85);
381
background: var(--primary-a85);
382
}
383
384
.app-shell .rc-slider-handle {
385
border-width: 1px;
386
box-shadow: 0 2px 10px rgba(var(--ink-rgb), 0.12);
387
}
388
389
/* =========================
390
Checklist styling (opt-in via .checklist class or specific IDs)
391
========================= */
392
393
.app-shell .checklist label,
394
.app-shell #yf_checklist label,
395
.app-shell #exit_checklist label,
396
.app-shell #sim_checklist label,
397
.app-shell #prob_checklist label,
398
.app-shell #stats_checklist label {
399
display: flex;
400
align-items: center;
401
gap: 8px;
402
margin: 6px 0;
403
color: var(--text-muted);
404
font-size: 14px;
405
}
406
407
.app-shell .checklist input,
408
.app-shell #yf_checklist input,
409
.app-shell #exit_checklist input,
410
.app-shell #sim_checklist input,
411
.app-shell #prob_checklist input,
412
.app-shell #stats_checklist input {
413
margin-right: 8px;
414
}
415
416
.app-shell input[type="checkbox"] {
417
accent-color: var(--primary);
418
}
419
420
/* =========================
421
DataTable (Dash)
422
========================= */
423
424
.app-shell .dash-table-container .dash-spreadsheet-container {
425
border: 1px solid var(--border);
426
border-radius: var(--radius-md);
427
overflow: hidden;
428
box-shadow: var(--shadow-sm);
429
}
430
431
.app-shell .dash-spreadsheet-inner {
432
background: var(--surface);
433
}
434
435
.app-shell .dash-spreadsheet-inner th {
436
background: #f8fafc;
437
color: var(--text-muted);
438
font-weight: 800;
439
border-bottom: 1px solid var(--border);
440
}
441
442
.app-shell .dash-spreadsheet-inner td {
443
border-bottom: 1px solid rgba(229, 231, 235, 0.7);
444
color: var(--text);
445
}
446
447
.app-shell .dash-table-container .dash-cell.focused,
448
.app-shell .dash-table-container .dash-cell.cell--selected {
449
outline: none;
450
box-shadow: inset 0 0 0 2px var(--primary-a35);
451
}
452
453
.app-shell .dash-spreadsheet-inner .row { margin: 0; }
454
455