/ music / double-pendulum
Sign in
music / double-pendulum
double-pendulum / src / style.css
78 lines · 4.2 KBCodeBlameHistory
73fe08adouble pendulum: album app with composition 1 (poincaré)Jeremy Magland 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; }
2913267Fit the composition page to phone screens; add a large play buttonJeremy Magland 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; }
73fe08adouble pendulum: album app with composition 1 (poincaré)Jeremy Magland 27header { color: var(--muted); }
28header a { color: var(--muted); }
29.sep { color: var(--dim); }
2913267Fit the composition page to phone screens; add a large play buttonJeremy Magland 31/* the canvas is the largest square that fits the space left between header and transport */
32.view { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
33.view canvas { display: block; flex: none; } /* sized in main.ts to the largest square that fits */
73fe08adouble pendulum: album app with composition 1 (poincaré)Jeremy Magland 34@media (max-width: 720px) {
35 .page { flex-direction: column; }
2913267Fit the composition page to phone screens; add a large play buttonJeremy Magland 38/* large play button over the plot until the piece starts */
39.big-play {
40 position: absolute; inset: 0; margin: auto; width: 88px; height: 88px; border-radius: 50%;
41 border: 1px solid var(--muted); background: rgba(11, 11, 11, 0.55); color: var(--fg);
42 font-size: 30px; line-height: 1; padding: 0 0 0 6px; cursor: pointer;
44.big-play:hover { border-color: var(--fg); }
45.big-play[hidden] { display: none; }
73fe08adouble pendulum: album app with composition 1 (poincaré)Jeremy Magland 47.transport { display: flex; align-items: center; gap: 12px; }
48.transport .play { min-width: 64px; }
49.progress { flex: 1; height: 1px; background: var(--dim); position: relative; }
50.progress.seekable { cursor: pointer; height: 9px; background: linear-gradient(var(--dim), var(--dim)) center / 100% 1px no-repeat; }
51.progress .bar { position: absolute; left: 0; top: 50%; height: 1px; margin-top: -0.5px; background: var(--fg); width: 0; }
52.edit { color: var(--muted); }
54.author {
55 width: 360px; flex: none; height: 100vh; overflow-y: auto; position: sticky; top: 0;
56 border-left: 1px solid var(--dim); padding: 12px; font-size: 12px;
58@media (max-width: 720px) { .author { width: auto; height: auto; position: static; border-left: none; border-top: 1px solid var(--dim); } }
59.author .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
60.author .status { color: var(--muted); }
61.author fieldset { border: none; border-top: 1px solid var(--dim); margin: 10px 0 0; padding: 6px 0 0; }
62.author legend { color: var(--muted); padding: 0 6px 0 0; }
63.author .row { display: grid; grid-template-columns: 110px 1fr 64px 36px; gap: 6px; align-items: center; margin: 3px 0; }
64.author .row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
65.author .row:has(select) , .author .row:has(input[type=checkbox]) { grid-template-columns: 110px 1fr; }
66.author .row:has(select) select { justify-self: start; }
67.author .row:has(input[type=checkbox]) input { justify-self: start; }
68.author > .row { grid-template-columns: 110px 80px; }
69.author input[type=number], .author select {
70 font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--dim); padding: 1px 3px; width: 100%;
72.author input[type=range] { width: 100%; accent-color: var(--muted); }
73.author .unit { color: var(--muted); }
74.readouts { display: grid; grid-template-columns: 110px 1fr; gap: 2px 6px; margin: 8px 0; color: var(--muted); }
75.readouts dt, .readouts dd { margin: 0; }
76.readouts dd { color: var(--fg); }
77.author .row.text { grid-template-columns: 110px 1fr; align-items: start; }
78.author textarea { font: inherit; font-size: 11px; color: var(--fg); background: var(--bg); border: 1px solid var(--dim); width: 100%; resize: vertical; }
↑↓ move↵openescclose