Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol
diffdown.com
1*, *::before, *::after {
2 box-sizing: border-box;
3 margin: 0;
4 padding: 0;
5}
6
7:root {
8 --bg: #fafafa;
9 --bg-card: #fff;
10 --text: #1a1a2e;
11 --text-muted: #6b7280;
12 --border: #e5e7eb;
13 --primary: #2563eb;
14 --primary-hover: #1d4ed8;
15 --danger: #dc2626;
16 --success: #16a34a;
17 --code-bg: #f3f4f6;
18 --alert-error-bg: #fef2f2;
19 --alert-error-border: #fecaca;
20 --radius: 6px;
21 --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
22 --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
23}
24
25[data-theme="dark"] {
26 --bg: #0d1117;
27 --bg-card: #161b22;
28 --text: #e6edf3;
29 --text-muted: #8b949e;
30 --border: #30363d;
31 --code-bg: #1f2428;
32 --primary: #388bfd;
33 --primary-hover: #58a6ff;
34 --danger: #f85149;
35 --success: #3fb950;
36 --alert-error-bg: #1c0608;
37 --alert-error-border: #6e1c20;
38}
39
40@media (prefers-color-scheme: dark) {
41 :root:not([data-theme="light"]) {
42 --bg: #0d1117;
43 --bg-card: #161b22;
44 --text: #e6edf3;
45 --text-muted: #8b949e;
46 --border: #30363d;
47 --code-bg: #1f2428;
48 --primary: #388bfd;
49 --primary-hover: #58a6ff;
50 --danger: #f85149;
51 --success: #3fb950;
52 --alert-error-bg: #1c0608;
53 --alert-error-border: #6e1c20;
54 }
55}
56
57body {
58 font-family: var(--font);
59 background: var(--bg);
60 color: var(--text);
61 line-height: 1.6;
62}
63
64a { color: var(--primary); text-decoration: none; }
65a:hover { text-decoration: underline; }
66
67/* Navbar */
68.navbar {
69 display: flex;
70 align-items: center;
71 justify-content: space-between;
72 padding: 0.75rem 1.5rem;
73 border-bottom: 1px solid var(--border);
74 background: var(--bg-card);
75}
76
77.logo {
78 font-weight: 700;
79 font-size: 1.1rem;
80 color: var(--text);
81}
82
83.nav-right {
84 display: flex;
85 align-items: center;
86 gap: 1rem;
87}
88
89.nav-user { color: var(--text-muted); }
90
91/* Buttons */
92.btn {
93 display: inline-block;
94 padding: 0.5rem 1rem;
95 background: var(--primary);
96 color: #fff;
97 border: 1px solid var(--primary);
98 border-radius: var(--radius);
99 cursor: pointer;
100 font-size: 0.875rem;
101 font-family: inherit;
102 text-decoration: none;
103}
104
105.btn:hover { background: var(--primary-hover); text-decoration: none; }
106.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
107.btn-lg { padding: 0.7rem 1.5rem; font-size: 1rem; }
108.btn-outline {
109 background: transparent;
110 color: var(--primary);
111}
112.btn-outline:hover { background: var(--primary); color: #fff; }
113.btn-danger.btn-outline:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
114.btn-link {
115 background: none;
116 border: none;
117 color: var(--text-muted);
118 cursor: pointer;
119 font-size: inherit;
120 font-family: inherit;
121}
122.btn-link:hover { color: var(--text); }
123.btn-oauth {
124 background: var(--bg);
125 color: var(--text);
126 border: 1px solid var(--border);
127 display: block;
128 text-align: center;
129 margin-bottom: 0.5rem;
130}
131.btn-oauth:hover { background: var(--border); }
132
133/* Main */
134main {
135 max-width: 1200px;
136 margin: 0 auto;
137 padding: 2rem 1.5rem;
138}
139
140/* Alerts */
141.alert {
142 padding: 0.75rem 1rem;
143 border-radius: var(--radius);
144 margin-bottom: 1rem;
145}
146
147.alert-error {
148 background: var(--alert-error-bg);
149 color: var(--danger);
150 border: 1px solid var(--alert-error-border);
151}
152
153/* Auth pages */
154.auth-page {
155 max-width: 400px;
156 margin: 2rem auto;
157}
158
159.auth-form label {
160 display: block;
161 margin-bottom: 1rem;
162 font-size: 0.875rem;
163 font-weight: 500;
164}
165
166.auth-form input, .auth-form select, .auth-form textarea {
167 display: block;
168 width: 100%;
169 margin-top: 0.25rem;
170 padding: 0.5rem 0.75rem;
171 border: 1px solid var(--border);
172 border-radius: var(--radius);
173 font-size: 0.9rem;
174 font-family: inherit;
175}
176
177.auth-form textarea { resize: vertical; }
178.auth-form .btn { width: 100%; margin-top: 0.5rem; }
179
180.auth-divider {
181 text-align: center;
182 margin: 1.5rem 0;
183 color: var(--text-muted);
184 font-size: 0.8rem;
185}
186
187.auth-divider span {
188 background: var(--bg);
189 padding: 0 1rem;
190}
191
192.auth-switch {
193 text-align: center;
194 margin-top: 1rem;
195 font-size: 0.875rem;
196 color: var(--text-muted);
197}
198
199/* Landing */
200.landing {
201 text-align: center;
202 padding: 4rem 0;
203}
204
205.landing h1 { font-size: 2.5rem; margin-bottom: 1rem; }
206.landing p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; }
207.landing-actions { display: flex; gap: 1rem; justify-content: center; }
208
209/* Dashboard */
210.dashboard-header {
211 display: flex;
212 justify-content: space-between;
213 align-items: center;
214 margin-bottom: 1.5rem;
215}
216
217.view-toggle {
218 display: flex;
219 gap: 0.25rem;
220}
221
222.view-toggle button {
223 background: none;
224 border: 1px solid var(--border);
225 border-radius: var(--radius);
226 padding: 0.25rem 0.5rem;
227 cursor: pointer;
228 color: var(--text-muted);
229 font-size: 1rem;
230 line-height: 1;
231}
232
233.view-toggle button.active {
234 background: var(--bg-card);
235 border-color: var(--primary);
236 color: var(--primary);
237}
238
239.repo-list {
240 display: grid;
241 grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
242 gap: 1rem;
243}
244
245.repo-list.list-view {
246 grid-template-columns: 1fr;
247 gap: 0;
248}
249
250.repo-list.list-view .repo-card {
251 border-radius: 0;
252 border-bottom: none;
253 display: flex;
254 align-items: baseline;
255 gap: 1rem;
256 padding: 0.75rem 1rem;
257}
258
259.repo-list.list-view .repo-card:first-child { border-radius: var(--radius) var(--radius) 0 0; }
260.repo-list.list-view .repo-card:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom: 1px solid var(--border); }
261.repo-list.list-view .repo-card:only-child { border-radius: var(--radius); border-bottom: 1px solid var(--border); }
262
263.repo-list.list-view .repo-card h3 { margin-bottom: 0; font-size: 1rem; font-weight: 500; }
264.repo-list.list-view .repo-card time { margin-top: 0; margin-left: auto; }
265.repo-list.list-view .repo-card:hover { border-color: var(--border); background: color-mix(in srgb, var(--primary) 5%, var(--bg-card)); }
266
267.repo-card {
268 display: block;
269 padding: 1.25rem;
270 background: var(--bg-card);
271 border: 1px solid var(--border);
272 border-radius: var(--radius);
273 color: var(--text);
274 transition: border-color 0.15s;
275}
276
277.repo-card:hover { border-color: var(--primary); text-decoration: none; }
278.repo-card h3 { margin-bottom: 0.5rem; }
279.repo-card p { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.5rem; }
280.repo-vis { font-size: 0.75rem; background: var(--bg); padding: 0.15rem 0.5rem; border-radius: 999px; }
281.repo-card time { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
282
283/* File browser */
284.repo-page { }
285.repo-header { margin-bottom: 1.5rem; }
286.repo-header h2 { margin-bottom: 0.25rem; }
287.repo-header p { color: var(--text-muted); }
288
289.file-browser {
290 background: var(--bg-card);
291 border: 1px solid var(--border);
292 border-radius: var(--radius);
293}
294
295.file-browser-header {
296 display: flex;
297 justify-content: space-between;
298 align-items: center;
299 padding: 0.75rem 1rem;
300 border-bottom: 1px solid var(--border);
301 font-weight: 600;
302}
303
304.file-list { list-style: none; }
305
306.file-list li {
307 display: flex;
308 justify-content: space-between;
309 align-items: center;
310 padding: 0.6rem 1rem;
311 border-bottom: 1px solid var(--border);
312}
313
314.file-list li:last-child { border-bottom: none; }
315.file-actions { display: flex; gap: 0.5rem; }
316
317/* File page */
318.file-page, .history-page, .diff-page { }
319
320.file-header {
321 display: flex;
322 justify-content: space-between;
323 align-items: center;
324 margin-bottom: 1.5rem;
325}
326
327.breadcrumb {
328 display: flex;
329 align-items: center;
330 gap: 0.5rem;
331 font-size: 0.9rem;
332}
333
334.breadcrumb span { color: var(--text-muted); }
335
336/* Version table */
337.version-table {
338 width: 100%;
339 border-collapse: collapse;
340 background: var(--bg-card);
341 border: 1px solid var(--border);
342 border-radius: var(--radius);
343 font-size: 0.875rem;
344}
345
346.version-table th, .version-table td {
347 padding: 0.6rem 0.75rem;
348 text-align: left;
349 border-bottom: 1px solid var(--border);
350}
351
352.version-table th { background: var(--bg); font-weight: 600; }
353
354.diff-controls { margin-bottom: 1rem; }
355
356/* Dialog */
357dialog {
358 border: 1px solid var(--border);
359 border-radius: var(--radius);
360 padding: 1.5rem;
361 max-width: 400px;
362}
363
364dialog::backdrop { background: rgba(0,0,0,0.3); }
365.dialog-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
366
367/* Empty state */
368.empty-state {
369 text-align: center;
370 padding: 2rem;
371 color: var(--text-muted);
372}
373
374/* Status indicators */
375.status-unsaved { color: #d97706; font-size: 0.8rem; }
376.status-saved { color: var(--success); font-size: 0.8rem; }
377.status-error { color: var(--danger); font-size: 0.8rem; }