/ interactive_tutorials / duffing_islands
Sign in
interactive_tutorials / duffing_islands
duffing_islands / app / style.css
156 lines · 3.8 KBCodeBlameHistory
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 1@font-face { font-family: "Source Serif 4"; font-weight: 300; src: url("vendor/fonts/source-serif-4-latin-300-normal.woff2") format("woff2"); }
2@font-face { font-family: "Hanken Grotesk"; font-weight: 400; src: url("vendor/fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
3@font-face { font-family: "Hanken Grotesk"; font-weight: 600; src: url("vendor/fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }
5:root {
6 --bg: #ffffff;
7 --fg: #1c2954;
8 --muted: #6b7491;
9 --line: #dde1ea;
10 --panel: #f5f6f9;
11 --accent: #f6862d;
12 --dot-light: 46%;
13 --font-head: "Tiempos Headline", "Source Serif 4", Georgia, serif;
14 --font-body: "Founders Grotesk", "Hanken Grotesk", system-ui, sans-serif;
17@media (prefers-color-scheme: dark) {
18 :root {
19 --bg: #121418;
20 --fg: #e6e8ee;
21 --muted: #8d94a8;
22 --line: #2a2e38;
23 --panel: #1a1d23;
24 --dot-light: 66%;
25 }
28* { box-sizing: border-box; }
30html, body { height: 100%; }
32body {
33 margin: 0;
34 display: flex;
35 flex-direction: column;
36 background: var(--bg);
37 color: var(--fg);
38 font-family: var(--font-body);
39 font-size: 15px;
42header { padding: 14px 20px 6px; }
44h1 {
45 margin: 0;
46 font-family: var(--font-head);
47 font-weight: 300;
48 font-size: 26px;
51.eq { margin: 4px 0 0; font-family: var(--font-head); font-size: 17px; }
52.eq i { font-family: var(--font-head); }
54.layout {
55 flex: 1;
56 min-height: 0;
57 display: flex;
58 gap: 16px;
59 padding: 8px 20px 20px;
62.panel {
63 flex: 0 0 290px;
64 display: flex;
65 flex-direction: column;
66 gap: 14px;
67 overflow-y: auto;
70.sliders, .sound { display: flex; flex-direction: column; gap: 8px; }
4087941Optional click mode: replace the orbit instead of addingJeremy Magland 72.sound, .click-mode { padding-top: 14px; border-top: 1px solid var(--line); }
74.row {
75 display: grid;
76 grid-template-columns: 74px 1fr 64px;
77 align-items: center;
78 gap: 8px;
81.row > span { color: var(--muted); font-size: 14px; }
82.row > select { grid-column: 2 / 4; }
83.row output { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
84.row sub, .row sup { font-size: 0.7em; }
86input[type="range"] { width: 100%; accent-color: var(--accent); }
88select, button {
89 font: inherit;
90 color: var(--fg);
91 background: var(--panel);
92 border: 1px solid var(--line);
93 border-radius: 6px;
94 padding: 6px 8px;
97button { cursor: pointer; }
99.keys { grid-column: 2 / 4; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
100.keys button { padding: 3px 0; font-size: 13px; }
102.toggle[aria-pressed="true"], .keys button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
104.quiet { background: none; color: var(--muted); align-self: flex-start; }
106.orbit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
107.orbit-list:empty { display: none; }
108.orbit-list li {
109 display: flex;
110 align-items: center;
111 gap: 6px;
112 padding: 2px 2px 2px 8px;
113 border: 1px solid var(--line);
114 border-radius: 999px;
115 font-size: 13px;
117.orbit-list .swatch { width: 10px; height: 10px; border-radius: 50%; }
118.orbit-list button { border: none; background: none; padding: 0 6px; color: var(--muted); line-height: 1; }
120.plot-wrap {
121 position: relative;
122 flex: 1;
123 min-width: 0;
124 min-height: 0;
127#plot {
128 position: absolute;
129 inset: 0;
130 width: 100%;
131 height: 100%;
132 cursor: crosshair;
133 touch-action: manipulation;
136.hint {
137 position: absolute;
138 top: 8px;
139 left: 60px;
140 margin: 0;
141 padding: 4px 10px;
142 border-radius: 6px;
143 background: var(--panel);
144 color: var(--muted);
145 font-size: 14px;
146 pointer-events: none;
149@media (max-width: 760px) {
150 header { padding: 12px 16px 4px; }
151 h1 { font-size: 22px; }
152 .layout { flex-direction: column; padding: 8px 16px 16px; }
153 .panel { flex: none; overflow: visible; }
154 .plot-wrap { flex: none; height: min(90vw, 70vh); order: -1; }
155 body { height: auto; }
↑↓ move↵openescclose