/ proof-of-concept / cymbalsim
Sign in
proof-of-concept / cymbalsim
cymbalsim / src / style.css
119 lines · 8.2 KBCodeBlameHistory
2 --bg: #16181d;
3 --bg2: #1e2128;
4 --bg3: #262a33;
5 --fg: #d8dbe2;
6 --fg2: #9aa0ad;
7 --accent: #5aa9ff;
8 --warn: #ffb454;
9 --err: #ff6b6b;
10 --ok: #7fd58a;
11 --border: #30343e;
12 --sidebar: 440px;
13 font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
14 font-size: 13px;
15 color-scheme: dark;
17* { box-sizing: border-box; }
686a6d1Make the hidden attribute win over display rulesJeremy Magland 18/* The hidden attribute must win over any display rule below (the tutorial panel and the loudness warning are flex boxes). */
19[hidden] { display: none !important; }
5778036cymbalsim: scripted plate and cymbal designer with a modal linear model and a von Karman GPU modelJeremy Magland 20html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
21a { color: var(--accent); }
22#app { display: flex; height: 100vh; overflow: hidden; }
23#sidebar { width: var(--sidebar); min-width: 280px; display: flex; flex-direction: column; background: var(--bg2); border-right: 1px solid var(--border); }
24#sidebarHead { padding: 8px 12px; border-bottom: 1px solid var(--border); }
351af76Interactive tutorial on the physics and the mathematics of the simulatorJeremy Magland 25#sidebarHead h1 { font-size: 15px; margin: 0; font-weight: 600; letter-spacing: 0.02em; }
26#titleRow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
27#tutorialBtn { font-size: 12px; padding: 2px 8px; }
28#tutorialBtn.active { border-color: var(--accent); color: var(--accent); }
5778036cymbalsim: scripted plate and cymbal designer with a modal linear model and a von Karman GPU modelJeremy Magland 29#sidebarBody { flex: 1; overflow-y: auto; padding: 6px 12px 24px 12px; }
30#splitter { width: 5px; cursor: col-resize; background: var(--bg); }
31#splitter:hover { background: var(--border); }
32#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
33#viewWrap { flex: 1; position: relative; min-height: 200px; }
34#view { width: 100%; height: 100%; display: block; }
35#viewOverlay { position: absolute; left: 8px; top: 6px; color: var(--fg2); font-size: 12px; pointer-events: none; white-space: pre-line; }
36#spec { height: 220px; width: 100%; display: block; background: #000; }
37.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 5px 10px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg2); font-size: 12px; }
38.toolbar label { display: inline-flex; align-items: center; gap: 4px; color: var(--fg2); }
39.toolbar input[type=range] { width: 120px; }
40#movieToolbar input[type=range].scrub { flex: 1; min-width: 120px; }
41button, select, input { font: inherit; color: var(--fg); background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; }
42button { cursor: pointer; }
43button:hover:not(:disabled) { border-color: var(--accent); }
44button:disabled { opacity: 0.45; cursor: default; }
45button.primary { background: #2b4a75; border-color: #3a6db0; }
46input[type=number] { width: 84px; padding: 2px 6px; text-align: right; }
47input[type=checkbox] { padding: 0; }
48details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: var(--fg); user-select: none; }
49details { border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 4px; }
50#about p { color: var(--fg2); margin: 4px 0; line-height: 1.4; }
51#controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
52#controls .grow { flex: 1; }
53.info { color: var(--fg2); font-size: 12px; line-height: 1.45; white-space: pre-line; margin-top: 6px; }
54.info .warn { color: var(--warn); }
55.info .err { color: var(--err); }
56.status { font-size: 12px; margin-top: 4px; }
57/* Editor */
58.design-editor .editor-head { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
59.design-editor .editor-head select { flex: 1; }
60.design-editor .editor-script { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
61.design-editor .editor-status { margin-top: 4px; font-size: 12px; white-space: pre-wrap; }
62.design-editor .editor-status-error { color: var(--err); }
63.design-editor .editor-status-ok { color: var(--ok); }
64.design-editor .editor-status-info { color: var(--fg2); }
65/* Form */
66.pform-group summary { font-weight: 600; }
67.pform-rows { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; align-items: center; }
68.pform-row { display: contents; }
69.pform-row label { color: var(--fg2); }
70.pform-control { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
71.pform-unit { color: var(--fg2); min-width: 28px; font-size: 12px; }
72.pform-notes { border: none; margin: 4px 0 0 0; padding: 0; }
73.pform-notes summary { font-weight: normal; color: var(--fg2); padding: 2px 0; font-size: 12px; }
74.pform-notes p { color: var(--fg2); font-size: 12px; margin: 2px 0; line-height: 1.45; white-space: pre-line; }
75/* Mode browser */
76.modes-head { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
77.modes-head input { width: 70px; }
78.modes-info { color: var(--fg2); font-size: 12px; margin-bottom: 4px; white-space: pre-line; }
79.modes-table { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 4px; }
80.modes-table table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
81.modes-table th { position: sticky; top: 0; background: var(--bg3); text-align: right; padding: 3px 6px; font-weight: 600; }
82.modes-table th:first-child, .modes-table td:first-child { text-align: left; }
83.modes-table td { text-align: right; padding: 2px 6px; cursor: pointer; }
84.modes-table tr:hover td { background: var(--bg3); }
85.modes-table tr.selected td { background: #2b4a75; }
86.progress { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; margin: 4px 0; }
87.progress > div { height: 100%; background: var(--accent); width: 0; transition: width 0.15s; }
88.badge { display: inline-block; padding: 1px 6px; border-radius: 3px; background: var(--bg3); color: var(--fg2); font-size: 11px; }
89.badge.warn { color: var(--warn); }
c99922dWarn before playing a recording that peaks near full scaleJeremy Magland 90.loud-warn { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 5px 8px; border: 1px solid var(--warn); border-radius: 4px; color: var(--warn); background: #2a2415; }
91.loud-warn button { border-color: var(--warn); }
94#tutorial { width: 440px; min-width: 320px; display: flex; flex-direction: column; background: var(--bg2); border-left: 1px solid var(--border); font-size: 13.5px; }
95.tut-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
96.tut-title { font-weight: 600; }
97.tut-head select { flex: 1; min-width: 0; }
98.tut-close { padding: 1px 8px; font-size: 15px; line-height: 1.2; }
99.tut-body { flex: 1; overflow-y: auto; padding: 8px 14px 16px 14px; line-height: 1.5; }
100.tut-body h2 { font-size: 16px; margin: 2px 0 10px 0; font-weight: 600; }
101.tut-chapter { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg2); }
102.tut-body p { margin: 8px 0; }
103.tut-body i { color: #e8eaf0; }
104.tut-body .katex-display { margin: 8px 0; overflow-x: auto; overflow-y: hidden; }
105.tut-body .katex { font-size: 1.05em; }
106.tut-live { background: var(--bg3); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 4px; padding: 8px 10px; margin: 10px 0; font-size: 12.5px; line-height: 1.5; }
107.tut-need { color: var(--fg2); font-style: italic; border: 1px dashed var(--border); border-radius: 4px; padding: 6px 10px; margin: 10px 0; font-size: 12.5px; }
108.tut-table { border-collapse: collapse; margin: 6px 0 2px 0; font-size: 12px; font-variant-numeric: tabular-nums; }
109.tut-table th { text-align: right; padding: 2px 8px 2px 0; font-weight: 600; border-bottom: 1px solid var(--border); }
110.tut-table td { text-align: right; padding: 2px 8px 2px 0; }
111.tut-table th:first-child, .tut-table td:first-child { text-align: left; }
112.tut-bar { display: inline-block; width: 90px; height: 8px; background: var(--bg); border-radius: 2px; overflow: hidden; vertical-align: middle; }
113.tut-bar > span { display: block; height: 100%; background: var(--accent); }
114.tut-actions { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
115.tut-actions-label { width: 100%; font-weight: 600; color: var(--fg2); font-size: 12px; }
116.tut-actions button { font-size: 12px; }
117.tut-error { color: var(--err); padding: 4px 14px; font-size: 12px; }
118.tut-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); }
119.tut-counter { color: var(--fg2); font-size: 12px; }
↑↓ move↵openescclose