/ music / double-pendulum
Sign in
music / double-pendulum
double-pendulum / src / style.css
79 lines · 4.2 KBBlameHistoryRaw
1/* Deliberately bare; real styling comes later. */
2:root {
3 --bg: #0b0b0b;
4 --fg: #d8d8d8;
5 --dim: #2e2e2e;
6 --muted: #777;
7 color-scheme: dark;
8}
9* { box-sizing: border-box; }
10html, body { margin: 0; background: var(--bg); color: var(--fg); }
11body { font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
12a { color: var(--fg); text-decoration: none; }
13a:hover { text-decoration: underline; }
14button {
15 font: inherit; color: var(--fg); background: none; border: 1px solid var(--dim);
16 padding: 2px 10px; cursor: pointer;
18button:hover { border-color: var(--muted); }
20.album { max-width: 640px; margin: 15vh auto; padding: 0 16px; }
21.album h1 { font-weight: normal; font-size: 18px; margin: 0 0 24px; }
22.tracks { padding-left: 1.5em; }
24.page { display: flex; min-height: 100vh; min-height: 100dvh; }
25/* the stage always fits the visible screen (dvh tracks mobile browser bars), so play is never below the fold */
26.stage { flex: 1; min-width: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 16px; gap: 12px; }
27header { color: var(--muted); }
28.notice { color: var(--muted); font-size: 12px; min-height: 1.4em; margin-top: -6px; }
29header a { color: var(--muted); }
30.sep { color: var(--dim); }
32/* the canvas is the largest square that fits the space left between header and transport */
33.view { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
34.view canvas { display: block; flex: none; } /* sized in main.ts to the largest square that fits */
35@media (max-width: 720px) {
36 .page { flex-direction: column; }
39/* large play button over the plot until the piece starts */
40.big-play {
41 position: absolute; inset: 0; margin: auto; width: 88px; height: 88px; border-radius: 50%;
42 border: 1px solid var(--muted); background: rgba(11, 11, 11, 0.55); color: var(--fg);
43 font-size: 30px; line-height: 1; padding: 0 0 0 6px; cursor: pointer;
45.big-play:hover { border-color: var(--fg); }
46.big-play[hidden] { display: none; }
48.transport { display: flex; align-items: center; gap: 12px; }
49.transport .play { min-width: 64px; }
50.progress { flex: 1; height: 1px; background: var(--dim); position: relative; }
51.progress.seekable { cursor: pointer; height: 9px; background: linear-gradient(var(--dim), var(--dim)) center / 100% 1px no-repeat; }
52.progress .bar { position: absolute; left: 0; top: 50%; height: 1px; margin-top: -0.5px; background: var(--fg); width: 0; }
53.edit { color: var(--muted); }
55.author {
56 width: 360px; flex: none; height: 100vh; overflow-y: auto; position: sticky; top: 0;
57 border-left: 1px solid var(--dim); padding: 12px; font-size: 12px;
59@media (max-width: 720px) { .author { width: auto; height: auto; position: static; border-left: none; border-top: 1px solid var(--dim); } }
60.author .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
61.author .status { color: var(--muted); }
62.author fieldset { border: none; border-top: 1px solid var(--dim); margin: 10px 0 0; padding: 6px 0 0; }
63.author legend { color: var(--muted); padding: 0 6px 0 0; }
64.author .row { display: grid; grid-template-columns: 110px 1fr 64px 36px; gap: 6px; align-items: center; margin: 3px 0; }
65.author .row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
66.author .row:has(select) , .author .row:has(input[type=checkbox]) { grid-template-columns: 110px 1fr; }
67.author .row:has(select) select { justify-self: start; }
68.author .row:has(input[type=checkbox]) input { justify-self: start; }
69.author > .row { grid-template-columns: 110px 80px; }
70.author input[type=number], .author select {
71 font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--dim); padding: 1px 3px; width: 100%;
73.author input[type=range] { width: 100%; accent-color: var(--muted); }
74.author .unit { color: var(--muted); }
75.readouts { display: grid; grid-template-columns: 110px 1fr; gap: 2px 6px; margin: 8px 0; color: var(--muted); }
76.readouts dt, .readouts dd { margin: 0; }
77.readouts dd { color: var(--fg); }
78.author .row.text { grid-template-columns: 110px 1fr; align-items: start; }
79.author textarea { font: inherit; font-size: 11px; color: var(--fg); background: var(--bg); border: 1px solid var(--dim); width: 100%; resize: vertical; }
↑↓ move↵openescclose