/ interactive_tutorials / mcmc_sonification
Sign in
interactive_tutorials / mcmc_sonification
mcmc_sonification / app / style.css
207 lines · 5.3 KBCodeBlameHistory
726adb6Listening for convergence: MCMC chains on a 2D mixture, sonifiedJeremy 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 --density: #2f4a9e;
13 --dot-light: 46%;
14 --font-head: "Tiempos Headline", "Source Serif 4", Georgia, serif;
15 --font-body: "Founders Grotesk", "Hanken Grotesk", system-ui, sans-serif;
18@media (prefers-color-scheme: dark) {
19 :root {
20 --bg: #121418;
21 --fg: #e6e8ee;
22 --muted: #8d94a8;
23 --line: #2a2e38;
24 --panel: #1a1d23;
25 --density: #9fb4f0;
26 --dot-light: 66%;
27 }
30* { box-sizing: border-box; }
32html, body { height: 100%; }
34body {
35 margin: 0;
36 display: flex;
37 flex-direction: column;
38 background: var(--bg);
39 color: var(--fg);
40 font-family: var(--font-body);
41 font-size: 15px;
44header {
45 padding: 14px 20px 6px;
46 display: flex;
47 align-items: center;
48 justify-content: space-between;
49 gap: 16px;
52/* the sound switch: large, and loud in color while the sound is off */
53.sound-button {
54 flex: none;
55 display: flex;
56 align-items: center;
57 gap: 10px;
58 padding: 10px 20px;
59 border-radius: 999px;
60 border: 2px solid var(--accent);
61 background: var(--accent);
62 color: #fff;
63 font-size: 17px;
64 font-weight: 600;
65 box-shadow: 0 2px 10px rgba(246, 134, 45, 0.35);
67.sound-button .icon { font-size: 20px; line-height: 1; }
68.sound-button:hover { filter: brightness(1.05); }
69.sound-button[aria-pressed="true"] { background: var(--panel); color: var(--fg); box-shadow: none; }
71h1 {
72 margin: 0;
73 font-family: var(--font-head);
74 font-weight: 300;
75 font-size: 26px;
78.eq { margin: 4px 0 0; font-family: var(--font-head); font-size: 17px; }
79.eq i { font-family: var(--font-head); }
81.layout {
82 flex: 1;
83 min-height: 0;
84 display: flex;
85 gap: 16px;
86 padding: 8px 20px 20px;
89.panel {
90 flex: 0 0 300px;
91 display: flex;
92 flex-direction: column;
93 gap: 14px;
94 overflow-y: auto;
95 padding-right: 4px;
98.group { display: flex; flex-direction: column; gap: 8px; }
99.group + .group { padding-top: 14px; border-top: 1px solid var(--line); }
101h2 {
102 margin: 0;
103 font-size: 13px;
104 font-weight: 600;
105 letter-spacing: 0.04em;
106 text-transform: uppercase;
107 color: var(--muted);
109h2 .note { text-transform: none; letter-spacing: 0; font-weight: 400; }
111.sliders { display: flex; flex-direction: column; gap: 6px; }
113.row {
114 display: grid;
115 grid-template-columns: 78px 1fr 56px;
116 align-items: center;
117 gap: 8px;
120.row[hidden] { display: none; }
121.row > span { color: var(--muted); font-size: 14px; }
122.row > select { grid-column: 2 / 4; }
123.row output { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
124.row sub, .row sup { font-size: 0.7em; }
126.note { margin: 0; color: var(--muted); font-size: 13px; }
128input[type="range"] { width: 100%; accent-color: var(--accent); }
130select, button {
131 font: inherit;
132 color: var(--fg);
133 background: var(--panel);
134 border: 1px solid var(--line);
135 border-radius: 6px;
136 padding: 6px 8px;
139button { cursor: pointer; }
141.buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
143.keys { grid-column: 2 / 4; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
144.keys button { padding: 3px 0; font-size: 13px; }
146.toggle[aria-pressed="true"], .keys button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
148.chain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
149.chain-list:empty { display: none; }
150.chain-list li {
151 display: flex;
152 align-items: center;
153 gap: 6px;
154 padding: 2px 8px;
155 border: 1px solid var(--line);
156 border-radius: 999px;
157 font-size: 13px;
159.chain-list .swatch { width: 10px; height: 10px; border-radius: 50%; }
160.chain-list .acc { font-variant-numeric: tabular-nums; }
161.chain-list li { padding: 1px 7px; font-size: 12px; gap: 5px; }
163.stats { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
164.stats th, .stats td { padding: 2px 6px; text-align: right; }
165.stats th { color: var(--muted); font-weight: 400; }
166.stats th:first-child, .stats td:first-child { text-align: left; padding-left: 0; }
167.stats td:first-child { color: var(--muted); }
168.stats .off { color: var(--accent); font-weight: 600; }
170.plot-wrap {
171 position: relative;
172 flex: 1;
173 min-width: 0;
174 min-height: 0;
177#plot {
178 position: absolute;
179 inset: 0;
180 width: 100%;
181 height: 100%;
182 cursor: crosshair;
183 touch-action: manipulation;
186.hint {
187 position: absolute;
188 top: 8px;
189 left: 52px;
190 margin: 0;
191 padding: 4px 10px;
192 border-radius: 6px;
193 background: var(--panel);
194 color: var(--muted);
195 font-size: 14px;
196 pointer-events: none;
199@media (max-width: 760px) {
200 header { padding: 12px 16px 4px; flex-wrap: wrap; }
201 .sound-button { font-size: 15px; padding: 8px 16px; }
202 h1 { font-size: 22px; }
203 .layout { flex-direction: column; padding: 8px 16px 16px; }
204 .panel { flex: none; overflow: visible; padding-right: 0; }
205 .plot-wrap { flex: none; height: min(130vw, 85vh); order: -1; }
206 body { height: auto; }
↑↓ move↵openescclose