@lvl99dotcom/edaha-editor 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +8 -1
  2. package/dist/client/assets/index--k7n6Qb8.css +1 -0
  3. package/dist/client/assets/{index-BwcJ6yrI.js → index-owkKXGfS.js} +140 -126
  4. package/dist/client/index.html +2 -2
  5. package/dist/client-lib/index.js +4037 -0
  6. package/dist/client-lib/style.css +1569 -0
  7. package/dist/editor/index.d.ts +24 -1
  8. package/dist/editor/index.js +15 -1
  9. package/dist/server/store/index.d.ts +2 -1
  10. package/dist/server/store/index.js +4 -3
  11. package/dist/types/client/components/define/index.d.ts +7 -0
  12. package/dist/types/client/components/edaha-article/index.d.ts +380 -0
  13. package/dist/types/client/components/edaha-article-browser/index.d.ts +162 -0
  14. package/dist/types/client/components/edaha-article-data-field/index.d.ts +121 -0
  15. package/dist/types/client/components/edaha-article-data-group/index.d.ts +40 -0
  16. package/dist/types/client/components/edaha-editor/index.d.ts +289 -0
  17. package/dist/types/client/components/edaha-embed-dialog/index.d.ts +84 -0
  18. package/dist/types/client/components/edaha-file-browser/index.d.ts +203 -0
  19. package/dist/types/client/components/edaha-markdown/index.d.ts +70 -0
  20. package/dist/types/client/components/edaha-metadata-field/index.d.ts +100 -0
  21. package/dist/types/client/components/edaha-richtext/index.d.ts +88 -0
  22. package/dist/types/client/components/edaha-toasts/index.d.ts +47 -0
  23. package/dist/types/client/dates/index.d.ts +14 -0
  24. package/dist/types/client/editorApi/index.d.ts +129 -0
  25. package/dist/types/client/embeds/index.d.ts +74 -0
  26. package/dist/types/client/icons/index.d.ts +60 -0
  27. package/dist/types/client/index.d.ts +3 -0
  28. package/dist/types/client/markdown/index.d.ts +163 -0
  29. package/dist/types/client/metadataForm/index.d.ts +77 -0
  30. package/dist/types/client/narrow/index.d.ts +21 -0
  31. package/dist/types/client/richtext/editor/index.d.ts +34 -0
  32. package/dist/types/client/richtext/extensions/index.d.ts +90 -0
  33. package/dist/types/client/sortTable/index.d.ts +24 -0
  34. package/dist/types/client/theme/index.d.ts +48 -0
  35. package/dist/types/server/types/index.d.ts +251 -0
  36. package/package.json +15 -10
  37. package/dist/client/assets/index-D2Y17Fm-.css +0 -1
@@ -0,0 +1,1569 @@
1
+ :root {
2
+ /** Colours */
3
+ color-scheme: light dark;
4
+ --colour-text: #1d1d1f;
5
+ --colour-muted: #5a5a60;
6
+ --colour-background: #ffffff;
7
+ --colour-surface: #f4f4f6;
8
+ --colour-border: #d8d8de;
9
+ --colour-table-outline: #c0c0c6;
10
+ --colour-link: #3b9a04;
11
+ --colour-link-hover: #2b6f04;
12
+ --colour-focus: #3b9a04;
13
+ --colour-error: #b3261e;
14
+ /* Toasts use the opposite theme's colours, so they stand out */
15
+ --toast-scheme: dark;
16
+ --toast-text: #ececf0;
17
+ --toast-background: #1f1f23;
18
+ --toast-border: #38383f;
19
+ --toast-accent: #fda26d;
20
+
21
+ /** Fonts */
22
+ --font-family-base: Arial, sans-serif;
23
+ --font-size-base: 16px;
24
+ --font-size-xl: 1.4rem;
25
+ --font-size-l: 1.2rem;
26
+ --font-size-s: 0.9rem;
27
+ --font-size-xs: 0.8rem;
28
+ --font-size-title: 48px;
29
+ --font-size-h1: 32px;
30
+ --font-size-h2: 28px;
31
+ --font-size-h3: 24px;
32
+ --font-size-h4: 20px;
33
+ --font-size-h5: 18px;
34
+ --font-size-h6: 16px;
35
+
36
+ /** Borders */
37
+ --border-radius: 5px;
38
+ }
39
+
40
+ :root[data-theme="light"] {
41
+ color-scheme: light;
42
+ }
43
+
44
+ :root[data-theme="light"] .leaf-device::after {
45
+ content: "🍃";
46
+ }
47
+
48
+ :root[data-theme="light"] .theme-switcher::after {
49
+ content: "🌚";
50
+ }
51
+
52
+ :root[data-theme="dark"] {
53
+ color-scheme: dark;
54
+ --colour-text: #ececf0;
55
+ --colour-muted: #a6a6ae;
56
+ --colour-background: #141416;
57
+ --colour-surface: #1f1f23;
58
+ --colour-border: #38383f;
59
+ --colour-table-outline: #8a8a92;
60
+ --colour-link: #dc6d2c;
61
+ --colour-link-hover: #fda26d;
62
+ --colour-focus: #fda26d;
63
+ --colour-error: #ffb4ab;
64
+ --toast-scheme: light;
65
+ --toast-text: #1d1d1f;
66
+ --toast-background: #ffffff;
67
+ --toast-border: #d8d8de;
68
+ --toast-accent: #3b9a04;
69
+ }
70
+
71
+ :root[data-theme="dark"] .leaf-device::after {
72
+ content: "🍂";
73
+ }
74
+
75
+ :root[data-theme="dark"] .theme-switcher::after {
76
+ content: "🌝";
77
+ }
78
+
79
+ /* Dark colours: the device's choice unless the theme switcher chose light, or the theme switcher's choice */
80
+ @media (prefers-color-scheme: dark) {
81
+ :root:not([data-theme="light"]) {
82
+ --colour-text: #ececf0;
83
+ --colour-muted: #a6a6ae;
84
+ --colour-background: #141416;
85
+ --colour-surface: #1f1f23;
86
+ --colour-border: #38383f;
87
+ --colour-table-outline: #8a8a92;
88
+ --colour-link: #dc6d2c;
89
+ --colour-link-hover: #fda26d;
90
+ --colour-focus: #fda26d;
91
+ --colour-error: #ffb4ab;
92
+ --toast-scheme: light;
93
+ --toast-text: #1d1d1f;
94
+ --toast-background: #ffffff;
95
+ --toast-border: #d8d8de;
96
+ --toast-accent: #3b9a04;
97
+ }
98
+
99
+ :root:not([data-theme="light"]) .leaf-device::after {
100
+ content: "🍂";
101
+ }
102
+
103
+ :root:not([data-theme="light"]) .theme-switcher::after {
104
+ content: "🌝";
105
+ }
106
+ }
107
+
108
+ *,
109
+ *::before,
110
+ *::after {
111
+ box-sizing: border-box;
112
+ }
113
+
114
+ body {
115
+ margin: 0;
116
+ background: var(--colour-background);
117
+ color: var(--colour-text);
118
+ font-family: Arial, sans-serif;
119
+ font-size: var(--font-size-base);
120
+ line-height: 1.6;
121
+ }
122
+
123
+ a {
124
+ color: var(--colour-link);
125
+ }
126
+
127
+ a:hover {
128
+ color: var(--colour-link-hover);
129
+ }
130
+
131
+ a:focus-visible,
132
+ button:focus-visible,
133
+ .button:focus-visible {
134
+ outline: 3px solid var(--colour-focus);
135
+ outline-offset: 2px;
136
+ }
137
+
138
+ h1 {
139
+ font-size: var(--font-size-h1);
140
+ }
141
+
142
+ h2 {
143
+ font-size: var(--font-size-h2);
144
+ }
145
+
146
+ h3 {
147
+ font-size: var(--font-size-h3);
148
+ }
149
+
150
+ h4 {
151
+ font-size: var(--font-size-h4);
152
+ }
153
+
154
+ h5 {
155
+ font-size: var(--font-size-h5);
156
+ }
157
+
158
+ h6 {
159
+ font-size: var(--font-size-h6);
160
+ }
161
+
162
+ img {
163
+ max-width: 100%;
164
+ height: auto;
165
+ }
166
+
167
+ pre {
168
+ overflow-x: auto;
169
+ padding: 1rem;
170
+ background: var(--colour-surface);
171
+ }
172
+
173
+ code {
174
+ background: var(--colour-surface);
175
+ color: var(--colour-muted);
176
+ font-size: var(--font-size-s);
177
+ padding: 0.2em;
178
+ }
179
+
180
+ .theme-switcher {
181
+ background: transparent;
182
+ border: 0;
183
+ appearance: unset;
184
+ position: absolute;
185
+ right: 1rem;
186
+ top: 1rem;
187
+ }
188
+
189
+ /* Room for the theme switcher, which sits beside the title, when the title is hidden */
190
+ edaha-editor[hide-title]:not([hide-theme-switcher], [compact])
191
+ .edaha-editor-nav {
192
+ padding-top: 3rem;
193
+ }
194
+
195
+ /* The editor and its scrolling panes hold what's positioned inside them, e.g. the .visually-hidden labels of buttons
196
+ low in a pane: otherwise those are placed against the page, making it taller than the window, so it scrolls (e.g.
197
+ when typing) and leaves a gap under the editor */
198
+ edaha-editor,
199
+ .edaha-article-main,
200
+ .edaha-article-metadata,
201
+ .edaha-article-metadata-fields,
202
+ .article-browser-results,
203
+ .embed-dialog-body {
204
+ position: relative;
205
+ }
206
+
207
+ /* Hidden on screen but read by screen readers, e.g. extra context for "Read more" links */
208
+ .visually-hidden {
209
+ position: absolute;
210
+ width: 1px;
211
+ height: 1px;
212
+ margin: -1px;
213
+ padding: 0;
214
+ border: 0;
215
+ overflow: hidden;
216
+ clip: rect(0 0 0 0);
217
+ clip-path: inset(50%);
218
+ white-space: nowrap;
219
+ }
220
+
221
+ /** Inputs */
222
+ input[type="text"],
223
+ input[type="number"],
224
+ input[type="email"],
225
+ input[type="url"],
226
+ input[type="search"],
227
+ input[type="colorpicker"],
228
+ input[type="date"],
229
+ input[type="date-local"],
230
+ input[type="time"],
231
+ input[type="time-local"],
232
+ input[type="datetime"],
233
+ input[type="datetime-local"],
234
+ textarea,
235
+ select {
236
+ background: var(--colour-background);
237
+ border: solid 1px var(--colour-border);
238
+ border-radius: var(--border-radius);
239
+ color: var(--colour-text);
240
+ padding: 0.25rem 0.5rem;
241
+ font-family: var(--font-family-base);
242
+ font-size: var(--font-size-base);
243
+ line-height: 1;
244
+ }
245
+
246
+ select {
247
+ appearance: none;
248
+ /* Room on the right for the arrow, so long option text doesn't run under it */
249
+ padding-inline-end: 2rem;
250
+ /* A small chevron drawn in the text colour, so it follows the light and dark themes */
251
+ background-image:
252
+ linear-gradient(45deg, transparent 50%, currentColor 50%),
253
+ linear-gradient(135deg, currentColor 50%, transparent 50%);
254
+ background-position:
255
+ right 0.85rem center,
256
+ right 0.55rem center;
257
+ background-size: 0.3rem 0.3rem;
258
+ background-repeat: no-repeat;
259
+ }
260
+
261
+ /** Buttons */
262
+ .btn {
263
+ font-size: 1rem;
264
+ padding: 0.5rem 1rem;
265
+ background-color: var(--colour-surface);
266
+ border: solid 1px var(--colour-border);
267
+ border-radius: var(--border-radius);
268
+ color: var(--colour-text);
269
+ }
270
+
271
+ .btn:hover {
272
+ background-color: var(--colour-background);
273
+ color: var(--colour-text);
274
+ border-color: var(--colour-muted);
275
+ }
276
+
277
+ .btn-xs {
278
+ font-size: 0.8rem;
279
+ padding: 0.3rem 0.5rem;
280
+ }
281
+
282
+ .btn-s {
283
+ font-size: 0.9rem;
284
+ padding: 0.5rem 1rem;
285
+ }
286
+
287
+ .btn-none {
288
+ padding: 0;
289
+ margin: 0;
290
+ border: 0;
291
+ appearance: unset;
292
+ }
293
+
294
+ .btn-save-dirty {
295
+ background-color: var(--colour-link);
296
+ border-color: var(--colour-link);
297
+ color: var(--colour-background);
298
+ }
299
+
300
+ .btn-save-dirty:hover {
301
+ background-color: var(--colour-link-hover);
302
+ border-color: var(--colour-link);
303
+ color: var(--colour-background);
304
+ }
305
+
306
+ .edaha-title {
307
+ font-size: var(--font-size-h3);
308
+ padding: 0;
309
+ margin: 0 0 0.5rem;
310
+ }
311
+
312
+ /* Three columns that fill the window and scroll on their own: the article list, the title and body, and the
313
+ article's buttons and settings (the last two are inside edaha-article) */
314
+ edaha-editor {
315
+ display: grid;
316
+ grid-template-columns: 16rem minmax(0, 1fr);
317
+ grid-template-rows: minmax(0, 1fr);
318
+ height: 100vh;
319
+ height: 100dvh;
320
+ overflow: hidden;
321
+ }
322
+
323
+ .edaha-editor-nav {
324
+ padding: 1rem;
325
+ position: relative;
326
+ overflow-y: auto;
327
+ }
328
+
329
+ .edaha-editor-new button {
330
+ width: 100%;
331
+ }
332
+
333
+ /* Home (the welcome prompt), under the search */
334
+ .edaha-editor-home {
335
+ margin-bottom: 1rem;
336
+ }
337
+
338
+ .edaha-editor-filters {
339
+ margin: 0.5rem 0 1rem;
340
+ }
341
+
342
+ .edaha-editor-filters select {
343
+ width: 100%;
344
+ }
345
+
346
+ .edaha-editor-article-group h2 {
347
+ color: var(--colour-muted);
348
+ font-size: var(--font-size-xs);
349
+ font-weight: normal;
350
+ text-transform: uppercase;
351
+ padding: 0;
352
+ margin: 1rem 0 0.25rem;
353
+ }
354
+
355
+ .edaha-editor-article-group ul,
356
+ .edaha-editor-article-group ol {
357
+ list-style-type: none;
358
+ padding: 0;
359
+ margin: 0;
360
+ }
361
+
362
+ .edaha-editor-article-group li {
363
+ list-style-type: none;
364
+ padding: 0;
365
+ margin: 0;
366
+ }
367
+
368
+ .edaha-editor-article-group-item-title {
369
+ display: block;
370
+ padding: 0.25rem 0;
371
+ }
372
+
373
+ .edaha-editor-article-group-item-title[aria-current="page"] {
374
+ background-color: var(--colour-link);
375
+ color: var(--colour-background);
376
+ padding: 0.25rem 0.5rem;
377
+ text-decoration: none;
378
+ border-radius: var(--border-radius);
379
+ }
380
+
381
+ .edaha-editor-article-group-item-meta {
382
+ display: none;
383
+ font-size: var(--font-size-s);
384
+ color: var(--colour-muted);
385
+ }
386
+
387
+ .edaha-editor-composer {
388
+ min-height: 0;
389
+ overflow: hidden;
390
+ }
391
+
392
+ /* The welcome prompt: centred in the pane until an article is opened or started */
393
+ .welcome-prompt {
394
+ display: flex;
395
+ align-items: center;
396
+ justify-content: center;
397
+ height: 100%;
398
+ padding: 1rem;
399
+ overflow-y: auto;
400
+ }
401
+
402
+ .welcome-prompt-box {
403
+ width: min(28rem, 100%);
404
+ margin: auto;
405
+ }
406
+
407
+ .welcome-prompt-message {
408
+ margin: 0 0 1rem;
409
+ font-size: var(--font-size-l);
410
+ text-align: center;
411
+ }
412
+
413
+ /* Its links are part of the sentence, so they keep its size */
414
+ .welcome-prompt-message .btn-link {
415
+ padding: 0;
416
+ font-size: inherit;
417
+ }
418
+
419
+ .welcome-prompt-list {
420
+ margin: 0;
421
+ padding: 0;
422
+ list-style: none;
423
+ border-top: 1px solid var(--colour-border);
424
+ }
425
+
426
+ .welcome-prompt-list li {
427
+ display: flex;
428
+ flex-direction: column;
429
+ padding: 0.5rem 0;
430
+ border-bottom: 1px solid var(--colour-border);
431
+ }
432
+
433
+ .welcome-prompt-meta {
434
+ color: var(--colour-muted);
435
+ font-size: var(--font-size-s);
436
+ }
437
+
438
+ .welcome-prompt-browse {
439
+ display: block;
440
+ margin: 0.75rem auto 0;
441
+ }
442
+
443
+ edaha-article {
444
+ display: block;
445
+ height: 100%;
446
+ }
447
+
448
+ edaha-article form {
449
+ display: grid;
450
+ grid-template-columns: minmax(0, 1fr) 20rem;
451
+ height: 100%;
452
+ }
453
+
454
+ /* The title and tabs, then the tab content filling the rest of the column's height (at least 300px). The column only
455
+ scrolls when the window is too short for that. */
456
+ .edaha-article-main {
457
+ display: flex;
458
+ flex-direction: column;
459
+ min-height: 0;
460
+ overflow-y: auto;
461
+ padding: 1rem;
462
+ }
463
+
464
+ .edaha-article-main > * {
465
+ flex: none;
466
+ }
467
+
468
+ .body-tabs {
469
+ display: flex;
470
+ gap: 0.25rem;
471
+ margin-block: 0.5rem;
472
+ border-bottom: 1px solid var(--colour-border);
473
+ }
474
+
475
+ .body-tabs [role="tab"] {
476
+ padding: 0.5rem 1rem;
477
+ margin-bottom: -1px;
478
+ background: transparent;
479
+ border: 1px solid transparent;
480
+ border-radius: var(--border-radius) var(--border-radius) 0 0;
481
+ color: var(--colour-muted);
482
+ font-size: 1rem;
483
+ }
484
+
485
+ .body-tabs [role="tab"]:hover {
486
+ color: var(--colour-text);
487
+ }
488
+
489
+ .body-tabs [role="tab"][aria-selected="true"] {
490
+ background: var(--colour-background);
491
+ border-color: var(--colour-border) var(--colour-border)
492
+ var(--colour-background);
493
+ color: var(--colour-text);
494
+ font-weight: bold;
495
+ }
496
+
497
+ .edaha-article-main > .body-panel {
498
+ flex: 1 1 0;
499
+ display: flex;
500
+ flex-direction: column;
501
+ min-height: 300px;
502
+ }
503
+
504
+ /* The title, with the focus mode button at the top right */
505
+ .edaha-article-title {
506
+ display: flex;
507
+ align-items: flex-start;
508
+ gap: 0.5rem;
509
+ }
510
+
511
+ .edaha-article-title > edaha-article-data-field {
512
+ flex: 1 1 auto;
513
+ min-width: 0;
514
+ }
515
+
516
+ /* Below a new article's title, until it is saved */
517
+ .unsaved-notice {
518
+ margin: 0;
519
+ color: var(--colour-muted);
520
+ font-size: var(--font-size-s);
521
+ }
522
+
523
+ /* The body's field fills the panel; its toolbar stays put while its text scrolls */
524
+ .body-panel > edaha-article-data-field {
525
+ flex: 1 1 0;
526
+ display: flex;
527
+ flex-direction: column;
528
+ min-height: 0;
529
+ margin-block: 0.5rem 0;
530
+ }
531
+
532
+ .body-panel edaha-richtext {
533
+ flex: 1 1 0;
534
+ display: flex;
535
+ flex-direction: column;
536
+ min-height: 0;
537
+ }
538
+
539
+ .body-panel .richtext-content {
540
+ /* Holds the floating format toolbar, which scrolls with the text */
541
+ position: relative;
542
+ flex: 1 1 0;
543
+ min-height: 0;
544
+ overflow-y: auto;
545
+ border: 1px solid var(--colour-border);
546
+ border-radius: var(--border-radius);
547
+ }
548
+
549
+ .body-panel .richtext-content .ProseMirror {
550
+ min-height: 100%;
551
+ }
552
+
553
+ .body-panel textarea {
554
+ flex: 1 1 0;
555
+ min-height: 0;
556
+ resize: none;
557
+ line-height: 1.5;
558
+ }
559
+
560
+ .edaha-article-metadata {
561
+ min-height: 0;
562
+ overflow-y: auto;
563
+ padding: 0 1rem 1rem;
564
+ }
565
+
566
+ /* The buttons stay at the top of the column while the settings scroll under them */
567
+ .edaha-article-controls {
568
+ position: sticky;
569
+ top: 0;
570
+ z-index: 1;
571
+ display: flex;
572
+ flex-wrap: wrap;
573
+ gap: 0.5rem;
574
+ padding-block: 1rem;
575
+ background: var(--colour-background);
576
+ border-bottom: 1px solid var(--colour-border);
577
+ }
578
+
579
+ edaha-article-data-field {
580
+ display: block;
581
+ margin-block: 0.5rem;
582
+ }
583
+
584
+ edaha-article-data-field input,
585
+ edaha-article-data-field select,
586
+ edaha-article-data-field textarea {
587
+ box-sizing: border-box;
588
+ width: 100%;
589
+ }
590
+
591
+ /* Toasts: in the middle at the top of the page, newest last, over everything else */
592
+ .toasts {
593
+ position: fixed;
594
+ top: 1rem;
595
+ left: 50%;
596
+ z-index: 40;
597
+ display: flex;
598
+ flex-direction: column;
599
+ align-items: center;
600
+ gap: 0.5rem;
601
+ width: max-content;
602
+ max-width: min(32rem, calc(100vw - 2rem));
603
+ transform: translateX(-50%);
604
+ }
605
+
606
+ /* In the opposite theme's colours (see --toast-* above) */
607
+ .toast {
608
+ color-scheme: var(--toast-scheme);
609
+ display: flex;
610
+ gap: 0.75rem;
611
+ align-items: center;
612
+ justify-content: space-between;
613
+ padding: 0.5rem 0.5rem 0.5rem 1rem;
614
+ background: var(--toast-background);
615
+ border: 1px solid var(--toast-border);
616
+ border-radius: var(--border-radius);
617
+ box-shadow: 0 4px 16px rgb(0 0 0 / 25%);
618
+ color: var(--toast-text);
619
+ }
620
+
621
+ .toast.error {
622
+ border: 2px solid var(--toast-accent);
623
+ }
624
+
625
+ .toast button {
626
+ padding: 0.25rem 0.5rem;
627
+ background: transparent;
628
+ border: 1px solid var(--toast-border);
629
+ border-radius: var(--border-radius);
630
+ color: inherit;
631
+ font: inherit;
632
+ cursor: pointer;
633
+ }
634
+
635
+ .toast button:hover {
636
+ border-color: var(--toast-text);
637
+ }
638
+
639
+ .toast button:focus-visible {
640
+ outline-color: var(--toast-accent);
641
+ }
642
+
643
+ .dialog-backdrop {
644
+ position: fixed;
645
+ z-index: 30;
646
+ inset: 0;
647
+ display: grid;
648
+ place-items: center;
649
+ background: rgb(0 0 0 / 40%);
650
+ }
651
+
652
+ .dialog {
653
+ padding: 1rem;
654
+ background: Canvas;
655
+ border: 1px solid;
656
+ }
657
+
658
+ .preview-controls {
659
+ display: flex;
660
+ gap: 0.5rem;
661
+ align-items: center;
662
+ margin-block: 0.5rem;
663
+ }
664
+
665
+ /* The preview is centred; wider than the panel, it starts at the panel's left and scrolls sideways */
666
+ .preview-frame {
667
+ flex: 1 1 0;
668
+ display: flex;
669
+ min-height: 0;
670
+ overflow-x: auto;
671
+ }
672
+
673
+ edaha-article .preview {
674
+ flex: none;
675
+ max-width: none;
676
+ margin-inline: auto;
677
+ border: 1px solid var(--colour-border);
678
+ }
679
+
680
+ .richtext-content .ProseMirror {
681
+ padding: 1rem;
682
+ min-height: 20rem;
683
+ }
684
+
685
+ /* Raw text, shown exactly as it is written: labelled, so it isn't mistaken for code */
686
+ .richtext-content pre.raw {
687
+ padding: 0.5rem;
688
+ border: 1px dashed;
689
+ white-space: pre-wrap;
690
+ }
691
+
692
+ .richtext-content pre.raw::before {
693
+ content: "Raw";
694
+ display: block;
695
+ font-family: system-ui, sans-serif;
696
+ font-weight: bold;
697
+ }
698
+
699
+ .richtext-content span.raw {
700
+ outline: 1px dashed;
701
+ white-space: pre-wrap;
702
+ }
703
+
704
+ .richtext-content img {
705
+ max-width: 100%;
706
+ }
707
+
708
+ /* Tables: a dotted light-grey outline round the table and its cells, so they can be seen while editing */
709
+ .richtext-content table {
710
+ border-collapse: collapse;
711
+ outline: 1px dotted var(--colour-table-outline);
712
+ }
713
+
714
+ .richtext-content th,
715
+ .richtext-content td {
716
+ min-width: 2rem;
717
+ padding: 0.25rem 0.5rem;
718
+ border: 1px dotted var(--colour-table-outline);
719
+ vertical-align: top;
720
+ }
721
+
722
+ /* A cell's text is in paragraphs, without space around them */
723
+ .richtext-content :is(th, td) > p {
724
+ margin: 0;
725
+ }
726
+
727
+ /* Editor-only blocks: outlined so they can be seen and clicked, and highlighted when selected */
728
+ .richtext-content .readmore-block,
729
+ .richtext-content .embed-block {
730
+ margin-block: 0.5rem;
731
+ padding: 0.5rem;
732
+ border: 1px dashed;
733
+ cursor: pointer;
734
+ }
735
+
736
+ .richtext-content .block-header {
737
+ display: flex;
738
+ gap: 0.5rem;
739
+ align-items: center;
740
+ }
741
+
742
+ .richtext-content .block-header span {
743
+ flex: 1;
744
+ }
745
+
746
+ /* Details blocks: outlined like the other blocks, with their summary and content outlined inside and labelled. The
747
+ content is always shown while editing (the extension's own toggle button, which hides it, isn't shown). */
748
+ .richtext-content [data-type="details"] {
749
+ margin-block: 0.5rem;
750
+ padding: 0.5rem;
751
+ border: 1px dashed;
752
+ /* Clicking the box (not its summary or content) selects the whole block */
753
+ cursor: pointer;
754
+ }
755
+
756
+ .richtext-content [data-type="details"] summary,
757
+ .richtext-content [data-type="detailsContent"] {
758
+ cursor: text;
759
+ }
760
+
761
+ .richtext-content [data-type="details"] > button {
762
+ display: none;
763
+ }
764
+
765
+ .richtext-content [data-type="details"] summary,
766
+ .richtext-content [data-type="detailsContent"] {
767
+ display: block;
768
+ margin-block-start: 0.5rem;
769
+ padding: 0.25rem 0.5rem;
770
+ border: 1px dotted;
771
+ }
772
+
773
+ .richtext-content [data-type="detailsContent"][hidden] {
774
+ display: block;
775
+ }
776
+
777
+ .richtext-content [data-type="details"]::before,
778
+ .richtext-content [data-type="details"] summary::before,
779
+ .richtext-content [data-type="detailsContent"]::before {
780
+ display: block;
781
+ font-size: 0.75em;
782
+ font-weight: normal;
783
+ opacity: 0.6;
784
+ }
785
+
786
+ .richtext-content [data-type="details"]::before {
787
+ content: "Details";
788
+ }
789
+
790
+ .richtext-content [data-type="details"] summary::before {
791
+ content: "Summary";
792
+ }
793
+
794
+ .richtext-content [data-type="detailsContent"]::before {
795
+ content: "Content";
796
+ }
797
+
798
+ /* An embed block's frame: as wide as the body, as tall as its content (it sends its height) */
799
+ .richtext-content .embed-frame {
800
+ display: block;
801
+ width: 100%;
802
+ height: 10rem;
803
+ margin-block-start: 0.5rem;
804
+ border: 0;
805
+ }
806
+
807
+ .richtext-content .block-header .embed-icon {
808
+ flex: none;
809
+ }
810
+
811
+ .richtext-content .embed-icon svg,
812
+ .embed-dialog .embed-icon svg {
813
+ width: 1.25rem;
814
+ height: 1.25rem;
815
+ }
816
+
817
+ /* An embed that can't be shown is shown as it is written */
818
+ .richtext-content .embed-content {
819
+ margin: 0.5rem 0 0;
820
+ white-space: pre-wrap;
821
+ overflow-wrap: anywhere;
822
+ }
823
+
824
+ .richtext-content .embed-errors {
825
+ margin-block-start: 0.5rem;
826
+ color: var(--colour-error);
827
+ }
828
+
829
+ .richtext-content .embed-errors p,
830
+ .richtext-content .embed-errors ul {
831
+ margin: 0;
832
+ }
833
+
834
+ /* Each kind of embed's toolbar button shows its icon at the toolbar's size */
835
+ .toolbar-embed .embed-icon svg {
836
+ width: 1.5rem;
837
+ height: 1.5rem;
838
+ }
839
+
840
+ .richtext-content .embed-warning {
841
+ margin: 0.5rem 0 0;
842
+ color: var(--colour-error);
843
+ }
844
+
845
+ /* The embed dialog: what the kind of embed embeds, its options, then its content */
846
+ .embed-dialog {
847
+ width: min(40rem, calc(100vw - 2rem));
848
+ }
849
+
850
+ .embed-dialog form {
851
+ display: flex;
852
+ flex-direction: column;
853
+ min-height: 0;
854
+ }
855
+
856
+ .embed-dialog-body {
857
+ display: flex;
858
+ flex-direction: column;
859
+ gap: 0.5rem;
860
+ padding: 0.5rem 1rem;
861
+ overflow-y: auto;
862
+ }
863
+
864
+ .embed-dialog-about,
865
+ .embed-dialog-hint {
866
+ color: var(--colour-muted);
867
+ font-size: var(--font-size-s);
868
+ }
869
+
870
+ .embed-dialog-hint {
871
+ margin: 0;
872
+ }
873
+
874
+ /* Why the content isn't valid, under it */
875
+ .embed-dialog-errors ul {
876
+ margin: 0;
877
+ padding-inline-start: 1.25rem;
878
+ color: var(--colour-error);
879
+ }
880
+
881
+ .embed-dialog textarea[aria-invalid="true"] {
882
+ border-color: var(--colour-error);
883
+ }
884
+
885
+ .embed-dialog textarea {
886
+ min-height: 2rem;
887
+ font-family: ui-monospace, monospace;
888
+ resize: vertical;
889
+ }
890
+
891
+ .embed-dialog-actions {
892
+ display: flex;
893
+ gap: 0.5rem;
894
+ padding: 0.5rem 1rem 1rem;
895
+ }
896
+
897
+ /* Heading IDs, shown after headings for copying into links */
898
+ .richtext-content .heading-id {
899
+ margin-inline-start: 0.5em;
900
+ font-size: 0.75em;
901
+ font-weight: normal;
902
+ opacity: 0.6;
903
+ user-select: all;
904
+ }
905
+
906
+ .richtext-content .ProseMirror-selectednode {
907
+ outline: 3px solid Highlight;
908
+ }
909
+
910
+ /* Formatting toolbars (rich text and Markdown): icon buttons, named by their tooltips and for screen readers */
911
+ .editor-toolbar {
912
+ display: flex;
913
+ flex-wrap: wrap;
914
+ gap: 0.25rem;
915
+ padding-block: 0.25rem 0.5rem;
916
+ }
917
+
918
+ .toolbar-button {
919
+ display: inline-flex;
920
+ align-items: center;
921
+ justify-content: center;
922
+ /* At least 24px by 24px for pointers and touch (WCAG 2.2 target size), larger for comfort */
923
+ min-width: 2.25rem;
924
+ min-height: 2.25rem;
925
+ padding: 0.25rem;
926
+ background: var(--colour-surface);
927
+ border: 1px solid var(--colour-border);
928
+ border-radius: var(--border-radius);
929
+ color: var(--colour-text);
930
+ cursor: pointer;
931
+ }
932
+
933
+ .toolbar-button:hover {
934
+ border-color: var(--colour-muted);
935
+ }
936
+
937
+ .toolbar-button[aria-pressed="true"] {
938
+ background: var(--colour-link);
939
+ border-color: var(--colour-link);
940
+ color: var(--colour-background);
941
+ }
942
+
943
+ .toolbar-button:disabled,
944
+ .toolbar-button[data-disabled] {
945
+ opacity: 0.4;
946
+ cursor: not-allowed;
947
+ }
948
+
949
+ /* The toolbar that floats above selected text in the rich text body (placed by the editor) */
950
+ .format-menu {
951
+ z-index: 10;
952
+ flex-wrap: nowrap;
953
+ width: max-content;
954
+ max-width: calc(100vw - 2rem);
955
+ padding: 0.25rem;
956
+ background: var(--colour-background);
957
+ border: 1px solid var(--colour-border);
958
+ border-radius: var(--border-radius);
959
+ box-shadow: 0 4px 16px rgb(0 0 0 / 25%);
960
+ }
961
+
962
+ /* The upload button is a label for its hidden file input, so it shows the input's focus */
963
+ .toolbar-upload:focus-within {
964
+ outline: 3px solid var(--colour-focus);
965
+ outline-offset: 2px;
966
+ }
967
+
968
+ .icon {
969
+ display: inline-flex;
970
+ }
971
+
972
+ .icon svg {
973
+ width: 1.5rem;
974
+ height: 1.5rem;
975
+ fill: currentColor;
976
+ }
977
+
978
+ [data-action="Remove column"] .icon svg {
979
+ transform: rotate(90deg);
980
+ }
981
+
982
+ .body-panel edaha-markdown {
983
+ flex: 1 1 0;
984
+ display: flex;
985
+ flex-direction: column;
986
+ min-height: 0;
987
+ }
988
+
989
+ /* Icon-only buttons (the menu button and closing the article list) */
990
+ .btn-icon {
991
+ display: inline-flex;
992
+ align-items: center;
993
+ justify-content: center;
994
+ min-width: 2.75rem;
995
+ min-height: 2.75rem;
996
+ padding: 0;
997
+ background: transparent;
998
+ border: 1px solid transparent;
999
+ border-radius: var(--border-radius);
1000
+ color: var(--colour-text);
1001
+ cursor: pointer;
1002
+ }
1003
+
1004
+ .btn-icon:hover {
1005
+ border-color: var(--colour-border);
1006
+ }
1007
+
1008
+ /* Only on narrow screens: the menu bar, the backdrop behind the open article list, closing it, and the button opening
1009
+ the settings full screen */
1010
+ .edaha-editor-bar,
1011
+ .nav-backdrop,
1012
+ .nav-close,
1013
+ .btn-metadata-toggle {
1014
+ display: none;
1015
+ }
1016
+
1017
+ /* The compact layout, on narrow screens and in focus mode (edaha-editor sets the `compact` attribute): one column, the
1018
+ article list opens over the page from the menu bar, and the article's buttons are a bar at the bottom of the screen
1019
+ that opens its settings */
1020
+ edaha-editor[compact] {
1021
+ grid-template-columns: minmax(0, 1fr);
1022
+ grid-template-rows: auto minmax(0, 1fr);
1023
+ }
1024
+
1025
+ edaha-editor[compact] .edaha-editor-bar {
1026
+ display: flex;
1027
+ align-items: center;
1028
+ gap: 0.5rem;
1029
+ padding: 0.25rem 0.5rem;
1030
+ border-bottom: 1px solid var(--colour-border);
1031
+ }
1032
+
1033
+ edaha-editor[compact] .edaha-editor-bar-title {
1034
+ font-weight: bold;
1035
+ }
1036
+
1037
+ edaha-editor[compact] .edaha-editor-nav {
1038
+ position: fixed;
1039
+ inset: 0 auto 0 0;
1040
+ z-index: 20;
1041
+ width: min(20rem, 85vw);
1042
+ padding-top: 3.5rem;
1043
+ background: var(--colour-background);
1044
+ border-right: 1px solid var(--colour-border);
1045
+ transform: translateX(-100%);
1046
+ visibility: hidden;
1047
+ transition:
1048
+ transform 0.2s ease,
1049
+ visibility 0.2s;
1050
+ }
1051
+
1052
+ /* Shown at once when opening, so focus can move into it, and hidden after sliding away when closing */
1053
+ edaha-editor[compact] .edaha-editor-nav.open {
1054
+ transform: none;
1055
+ visibility: visible;
1056
+ transition:
1057
+ transform 0.2s ease,
1058
+ visibility 0s;
1059
+ }
1060
+
1061
+ edaha-editor[compact] .nav-close {
1062
+ display: inline-flex;
1063
+ position: absolute;
1064
+ top: 0.5rem;
1065
+ right: 0.5rem;
1066
+ }
1067
+
1068
+ edaha-editor[compact] .edaha-editor-nav .theme-switcher {
1069
+ top: 0.5rem;
1070
+ right: 3.75rem;
1071
+ min-width: 2.75rem;
1072
+ min-height: 2.75rem;
1073
+ }
1074
+
1075
+ edaha-editor[compact] .nav-backdrop.open {
1076
+ display: block;
1077
+ position: fixed;
1078
+ inset: 0;
1079
+ z-index: 19;
1080
+ background: rgb(0 0 0 / 40%);
1081
+ }
1082
+
1083
+ edaha-editor[compact] edaha-article form {
1084
+ grid-template-columns: minmax(0, 1fr);
1085
+ }
1086
+
1087
+ /* Room for the bar at the bottom of the screen */
1088
+ edaha-editor[compact] .edaha-article-main {
1089
+ padding-bottom: 5rem;
1090
+ }
1091
+
1092
+ edaha-editor[compact] .edaha-article-metadata {
1093
+ position: fixed;
1094
+ inset: auto 0 0;
1095
+ z-index: 10;
1096
+ display: flex;
1097
+ flex-direction: column;
1098
+ padding: 0;
1099
+ overflow: hidden;
1100
+ background: var(--colour-background);
1101
+ border-top: 1px solid var(--colour-border);
1102
+ box-shadow: 0 -2px 8px rgb(0 0 0 / 15%);
1103
+ }
1104
+
1105
+ edaha-editor[compact] .edaha-article-metadata.open {
1106
+ top: 0;
1107
+ border-top: 0;
1108
+ }
1109
+
1110
+ edaha-editor[compact] .edaha-article-metadata-fields {
1111
+ display: none;
1112
+ }
1113
+
1114
+ edaha-editor[compact]
1115
+ .edaha-article-metadata.open
1116
+ .edaha-article-metadata-fields {
1117
+ display: block;
1118
+ flex: 1 1 0;
1119
+ min-height: 0;
1120
+ overflow-y: auto;
1121
+ padding: 0.5rem 1rem 1rem;
1122
+ }
1123
+
1124
+ /* The bar stays at the bottom, also while the settings are open */
1125
+ edaha-editor[compact] .edaha-article-controls {
1126
+ order: 2;
1127
+ position: static;
1128
+ padding: 0.5rem 1rem;
1129
+ border-top: 1px solid var(--colour-border);
1130
+ border-bottom: 0;
1131
+ }
1132
+
1133
+ edaha-editor[compact] .btn-metadata-toggle {
1134
+ display: inline-block;
1135
+ margin-inline-start: auto;
1136
+ min-width: 2.75rem;
1137
+ }
1138
+
1139
+ /* Focus mode: the title and body centred, at most 900px wide */
1140
+ edaha-editor[focus-mode] .edaha-article-main {
1141
+ box-sizing: border-box;
1142
+ justify-self: center;
1143
+ width: 100%;
1144
+ max-width: 900px;
1145
+ }
1146
+
1147
+ /* Narrow screens (keep in step with NARROW_QUERY in src/client/narrow) always have the compact layout */
1148
+ @media (max-width: 899.98px) {
1149
+ .btn-focus-mode {
1150
+ display: none;
1151
+ }
1152
+ }
1153
+
1154
+ @media (prefers-reduced-motion: reduce) {
1155
+ edaha-editor[compact] .edaha-editor-nav,
1156
+ edaha-editor[compact] .edaha-editor-nav.open {
1157
+ transition: none;
1158
+ }
1159
+ }
1160
+
1161
+ /* The nav's title search, with the button opening the article browser beside it */
1162
+ .edaha-editor-search {
1163
+ display: flex;
1164
+ gap: 0.25rem;
1165
+ align-items: center;
1166
+ margin: 0.5rem 0 1rem;
1167
+ }
1168
+
1169
+ .edaha-editor-search input {
1170
+ flex: 1;
1171
+ min-width: 0;
1172
+ min-height: 2.25rem;
1173
+ }
1174
+
1175
+ /* Buttons that look like links, e.g. "Show all" under a type's articles */
1176
+ .btn-link {
1177
+ padding: 0.25rem 0;
1178
+ background: none;
1179
+ border: 0;
1180
+ color: var(--colour-link);
1181
+ font: inherit;
1182
+ font-size: var(--font-size-s);
1183
+ text-decoration: underline;
1184
+ cursor: pointer;
1185
+ }
1186
+
1187
+ .btn-link:hover {
1188
+ color: var(--colour-link-hover);
1189
+ }
1190
+
1191
+ /* The article browser: a dialog over the page, its results scrolling under its search and filters */
1192
+ .article-browser {
1193
+ width: min(60rem, calc(100vw - 2rem));
1194
+ max-height: calc(100dvh - 2rem);
1195
+ padding: 0;
1196
+ background: var(--colour-background);
1197
+ border: 1px solid var(--colour-border);
1198
+ border-radius: var(--border-radius);
1199
+ color: var(--colour-text);
1200
+ }
1201
+
1202
+ .article-browser[open] {
1203
+ display: flex;
1204
+ flex-direction: column;
1205
+ }
1206
+
1207
+ .article-browser::backdrop {
1208
+ background: rgb(0 0 0 / 40%);
1209
+ }
1210
+
1211
+ .article-browser-header {
1212
+ display: flex;
1213
+ align-items: center;
1214
+ justify-content: space-between;
1215
+ padding: 0.5rem 0.5rem 0 1rem;
1216
+ }
1217
+
1218
+ .article-browser-header h2 {
1219
+ margin: 0;
1220
+ font-size: var(--font-size-h4);
1221
+ }
1222
+
1223
+ .article-browser-controls {
1224
+ display: grid;
1225
+ grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
1226
+ gap: 0.5rem 1rem;
1227
+ padding: 0.5rem 1rem;
1228
+ }
1229
+
1230
+ .article-browser-field {
1231
+ display: flex;
1232
+ flex-direction: column;
1233
+ gap: 0.25rem;
1234
+ }
1235
+
1236
+ .article-browser-field label {
1237
+ font-size: var(--font-size-s);
1238
+ }
1239
+
1240
+ .article-browser-field input,
1241
+ .article-browser-field select {
1242
+ width: 100%;
1243
+ min-height: 2.25rem;
1244
+ }
1245
+
1246
+ .article-browser-search {
1247
+ grid-column: 1 / -1;
1248
+ }
1249
+
1250
+ .article-browser-status {
1251
+ margin: 0;
1252
+ padding: 0.25rem 1rem;
1253
+ color: var(--colour-muted);
1254
+ font-size: var(--font-size-s);
1255
+ border-bottom: 1px solid var(--colour-border);
1256
+ }
1257
+
1258
+ .article-browser-results {
1259
+ flex: 1 1 auto;
1260
+ min-height: 0;
1261
+ overflow: auto;
1262
+ padding: 0.5rem 1rem 1rem;
1263
+ }
1264
+
1265
+ /* The results table: on narrow screens it scrolls sideways within the results */
1266
+ .article-browser-table {
1267
+ width: 100%;
1268
+ min-width: 36rem;
1269
+ border-collapse: collapse;
1270
+ font-size: var(--font-size-s);
1271
+ }
1272
+
1273
+ .article-browser-table th,
1274
+ .article-browser-table td {
1275
+ padding: 0.5rem 0.75rem 0.5rem 0;
1276
+ border-bottom: 1px solid var(--colour-border);
1277
+ text-align: left;
1278
+ vertical-align: top;
1279
+ }
1280
+
1281
+ .article-browser-table td:not(:first-child) {
1282
+ color: var(--colour-muted);
1283
+ white-space: nowrap;
1284
+ }
1285
+
1286
+ .article-browser-table td:first-child {
1287
+ font-size: 1rem;
1288
+ }
1289
+
1290
+ .article-browser-table td .error {
1291
+ display: block;
1292
+ }
1293
+
1294
+ /* Column headers are buttons that sort by their column */
1295
+ .sort-heading {
1296
+ display: inline-flex;
1297
+ gap: 0.25rem;
1298
+ align-items: center;
1299
+ min-height: 2rem;
1300
+ padding: 0;
1301
+ background: none;
1302
+ border: 0;
1303
+ color: var(--colour-text);
1304
+ font: inherit;
1305
+ font-weight: bold;
1306
+ white-space: nowrap;
1307
+ cursor: pointer;
1308
+ }
1309
+
1310
+ .sort-heading:hover {
1311
+ color: var(--colour-link);
1312
+ }
1313
+
1314
+ .sort-heading-arrow {
1315
+ font-size: 0.7em;
1316
+ }
1317
+
1318
+ .article-browser-pages {
1319
+ display: flex;
1320
+ gap: 1rem;
1321
+ align-items: center;
1322
+ justify-content: center;
1323
+ padding-top: 1rem;
1324
+ }
1325
+
1326
+ /* On narrow screens the article browser fills the screen */
1327
+ @media (max-width: 899.98px) {
1328
+ .article-browser {
1329
+ width: 100vw;
1330
+ max-width: none;
1331
+ height: 100dvh;
1332
+ max-height: none;
1333
+ margin: 0;
1334
+ border: 0;
1335
+ border-radius: 0;
1336
+ }
1337
+ }
1338
+
1339
+ /* The file browser's operations: icon buttons in a row */
1340
+ .file-browser-operations {
1341
+ display: flex;
1342
+ align-items: center;
1343
+ gap: 0.25rem;
1344
+ }
1345
+
1346
+ .file-browser-operations .btn-icon {
1347
+ min-width: 2.25rem;
1348
+ min-height: 2.25rem;
1349
+ color: var(--colour-text);
1350
+ }
1351
+
1352
+ /* Custom metadata fields, built from the config file's schemas */
1353
+ edaha-metadata-field {
1354
+ display: block;
1355
+ margin-block: 0.5rem;
1356
+ }
1357
+
1358
+ .metadata-field label {
1359
+ display: block;
1360
+ }
1361
+
1362
+ .metadata-field input:not([type="checkbox"], [type="radio"], [type="color"]),
1363
+ .metadata-field select,
1364
+ .metadata-field textarea {
1365
+ box-sizing: border-box;
1366
+ width: 100%;
1367
+ }
1368
+
1369
+ .metadata-group,
1370
+ .metadata-radio {
1371
+ margin: 0;
1372
+ padding: 0.5rem;
1373
+ border: 1px solid var(--colour-border);
1374
+ border-radius: var(--border-radius);
1375
+ }
1376
+
1377
+ .metadata-item {
1378
+ display: flex;
1379
+ gap: 0.5rem;
1380
+ align-items: flex-end;
1381
+ }
1382
+
1383
+ .metadata-item edaha-metadata-field {
1384
+ flex: 1;
1385
+ }
1386
+
1387
+ /*
1388
+ * Checkboxes and radio buttons come before their labels: on the left in left-to-right text, on the right in
1389
+ * right-to-left text. Their notes line up with the labels.
1390
+ */
1391
+ .metadata-check,
1392
+ .metadata-choice {
1393
+ display: grid;
1394
+ grid-template-columns: 1rem 1fr;
1395
+ column-gap: 0.5rem;
1396
+ align-items: center;
1397
+ margin-block: 0.25rem;
1398
+ }
1399
+
1400
+ .metadata-check input,
1401
+ .metadata-choice input {
1402
+ width: 1rem;
1403
+ height: 1rem;
1404
+ margin: 0;
1405
+ }
1406
+
1407
+ .metadata-choice small {
1408
+ grid-column: 2;
1409
+ color: var(--colour-muted);
1410
+ }
1411
+
1412
+ .metadata-checkbox > :not(.metadata-check) {
1413
+ margin-inline-start: 1.5rem;
1414
+ }
1415
+
1416
+ .metadata-description,
1417
+ .metadata-info {
1418
+ margin: 0.25rem 0;
1419
+ color: var(--colour-muted);
1420
+ font-size: var(--font-size-s);
1421
+ }
1422
+
1423
+ /* Problems show above their field */
1424
+ .metadata-problems,
1425
+ .metadata-warnings {
1426
+ margin: 0.25rem 0;
1427
+ padding: 0;
1428
+ list-style: none;
1429
+ font-size: var(--font-size-s);
1430
+ }
1431
+
1432
+ .metadata-problems .error {
1433
+ color: var(--colour-error);
1434
+ font-weight: bold;
1435
+ }
1436
+
1437
+ .metadata-problems .error::before {
1438
+ content: "⚠️ ";
1439
+ }
1440
+
1441
+ .metadata-warnings li,
1442
+ .metadata-problems .warning {
1443
+ color: var(--colour-muted);
1444
+ }
1445
+
1446
+ [aria-invalid="true"] {
1447
+ border-color: var(--colour-error);
1448
+ outline: 1px solid var(--colour-error);
1449
+ }
1450
+
1451
+ .metadata-file {
1452
+ display: flex;
1453
+ gap: 0.5rem;
1454
+ align-items: center;
1455
+ margin: 0.25rem 0;
1456
+ }
1457
+
1458
+ /* Articles with metadata problems, on the welcome prompt and in the article browser */
1459
+ .welcome-attention {
1460
+ margin-top: 1.5rem;
1461
+ }
1462
+
1463
+ .welcome-attention h2 {
1464
+ margin: 0 0 0.5rem;
1465
+ font-size: var(--font-size-h5);
1466
+ }
1467
+
1468
+ .article-browser-table td .problems {
1469
+ display: block;
1470
+ color: var(--colour-muted);
1471
+ }
1472
+
1473
+ /* Settings groups: sections of the settings column that open and close */
1474
+ .settings-group {
1475
+ border-bottom: 1px solid var(--colour-border);
1476
+ }
1477
+
1478
+ .settings-group > summary {
1479
+ display: flex;
1480
+ gap: 0.25rem;
1481
+ align-items: center;
1482
+ min-height: 2.75rem;
1483
+ padding: 0.5rem 0;
1484
+ font-weight: bold;
1485
+ cursor: pointer;
1486
+ }
1487
+
1488
+ /* A chevron shows whether it's open (flex headings lose the browser's own marker) */
1489
+ .settings-group > summary {
1490
+ list-style: none;
1491
+ }
1492
+
1493
+ .settings-group > summary::-webkit-details-marker {
1494
+ display: none;
1495
+ }
1496
+
1497
+ .settings-group > summary::before {
1498
+ content: "▸";
1499
+ display: inline-block;
1500
+ width: 1rem;
1501
+ transition: transform 0.15s;
1502
+ }
1503
+
1504
+ .settings-group[open] > summary::before {
1505
+ transform: rotate(90deg);
1506
+ }
1507
+
1508
+ @media (prefers-reduced-motion: reduce) {
1509
+ .settings-group > summary::before {
1510
+ transition: none;
1511
+ }
1512
+ }
1513
+
1514
+ .settings-group > summary:focus-visible {
1515
+ outline: 3px solid var(--colour-focus);
1516
+ outline-offset: 2px;
1517
+ }
1518
+
1519
+ .settings-group[open] > summary {
1520
+ margin-bottom: 0.25rem;
1521
+ }
1522
+
1523
+ .settings-group[open] {
1524
+ padding-bottom: 0.75rem;
1525
+ }
1526
+
1527
+ .settings-group-errors {
1528
+ margin-inline-start: auto;
1529
+ }
1530
+
1531
+ .settings-group-description {
1532
+ margin: 0 0 0.5rem;
1533
+ color: var(--colour-muted);
1534
+ font-size: var(--font-size-s);
1535
+ }
1536
+
1537
+ .files-title {
1538
+ margin: 0.75rem 0 0.25rem;
1539
+ font-size: var(--font-size-s);
1540
+ }
1541
+
1542
+ /* "No author", above the author's fields */
1543
+ .no-author {
1544
+ display: flex;
1545
+ gap: 0.5rem;
1546
+ align-items: center;
1547
+ margin-block: 0.25rem;
1548
+ }
1549
+
1550
+ /* Settings nobody defined, or the type doesn't use, each with a Remove button */
1551
+ .metadata-warnings li {
1552
+ display: flex;
1553
+ gap: 0.5rem;
1554
+ align-items: flex-start;
1555
+ justify-content: space-between;
1556
+ margin-block: 0.25rem;
1557
+ }
1558
+
1559
+ /* The title goes back to the welcome prompt, but looks like the title, not a button or link */
1560
+ .edaha-title-button {
1561
+ padding: 0;
1562
+ margin: 0;
1563
+ background: none;
1564
+ border: 0;
1565
+ color: inherit;
1566
+ font: inherit;
1567
+ text-align: inherit;
1568
+ cursor: pointer;
1569
+ }