-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstyles.css
More file actions
3045 lines (2638 loc) · 85.3 KB
/
Copy pathstyles.css
File metadata and controls
3045 lines (2638 loc) · 85.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* ==========================================================================
Draft Bench Plugin Stylesheet (BUILT)
==========================================================================
This file is generated from component files in styles/.
Do not edit directly. Edit the component files, then run:
npm run build:css
Components: 13
*/
/* --------------------------------------------------------------------------
VARIABLES.CSS (109 lines, 3.92 KB)
-------------------------------------------------------------------------- */
/*
* CSS custom properties for Draft Bench.
*
* Two layers:
*
* 1. `.dbench-scope` — plugin-internal scales (spacing, radius,
* transitions) used by modals and other scoped UI. Not
* user-configurable; lives class-scoped so it doesn't leak into
* unrelated parts of the DOM.
* 2. `body` — per-note-type styling (scene/draft typography,
* colors, archival cue). Declared at body scope so Style Settings
* overrides (injected at body or body[data-style-settings]
* specificity) can cleanly take precedence. Consumed in
* `notes.css` via `.dbench-scene ...` / `.dbench-draft ...`
* selectors that read these variables by inheritance.
*
* Color values reference Obsidian's native variables so the plugin
* inherits the user's theme automatically.
*/
.dbench-scope {
/* Spacing scale */
--dbench-spacing-xs: 4px;
--dbench-spacing-sm: 8px;
--dbench-spacing-md: 12px;
--dbench-spacing-lg: 16px;
--dbench-spacing-xl: 24px;
/* Border-radius scale */
--dbench-radius-xs: 2px;
--dbench-radius-sm: 4px;
--dbench-radius-md: 6px;
--dbench-radius-lg: 8px;
/* Transition scale */
--dbench-transition-fast: 100ms ease-out;
--dbench-transition-normal: 200ms ease-out;
--dbench-transition-slow: 300ms ease-out;
}
body {
/*
* Scene and draft typography — shared across both leaf types.
* Defaults match the user's theme (no visible change unless
* overridden via Style Settings or a CSS snippet).
*/
--dbench-scene-font-family: inherit;
--dbench-scene-font-size: inherit;
--dbench-scene-line-height: inherit;
--dbench-scene-max-width: var(--file-line-width);
/*
* Scene-leaf only. Defaults to "match theme" — the consuming
* rules apply these values but the values themselves are the
* same Obsidian vars the theme already uses, so no visible
* change until the user customizes.
*/
--dbench-scene-background: var(--background-primary);
--dbench-scene-text-color: var(--text-normal);
/*
* Draft-leaf only. The border-left is the archival cue that
* motivated leaf tagging in the first place — subtle default
* that reads sensibly in light and dark themes. Background and
* text color default to "match theme" as above.
*/
--dbench-draft-background: var(--background-primary);
--dbench-draft-text-color: var(--text-normal);
--dbench-draft-border-left: 3px solid var(--text-faint);
/*
* Status color palette. The D3 leaf restyle (#30) dropped per-
* status colors from the Manuscript view; these variables remain
* because the Manuscript Builder's status filter pills (#25) still
* use them to indicate the toggle state per status. The Style
* Settings exposures for the four named statuses were dropped
* alongside the leaf restyle; theme authors override these only
* by editing the CSS directly. `--dbench-status-default` is the
* fallback for out-of-vocabulary status values.
*/
--dbench-status-brainstorm: #5b8cd6;
--dbench-status-idea: #5b8cd6;
--dbench-status-draft: #9aa0a6;
--dbench-status-revision: #d4a443;
--dbench-status-final: #74b275;
--dbench-status-default: var(--text-muted);
/*
* Manuscript Builder Preview tab. Tunes the underline-pattern
* tabs in the Builder modal and the Preview tab's rendered
* prose. Per docs/planning/manuscript-builder-preview.md § 8;
* applied in manuscript-builder.css, exposed via
* style-settings.css.
*
* Preview tunes the in-Obsidian review register, NOT the final
* compiled PDF / ODT / DOCX output (those go through pdfmake /
* docx generators on a different rendering pipeline). Writers
* wanting to verify the final compile should compile to disk
* and open the file.
*/
--dbench-tab-active-accent: var(--interactive-accent);
--dbench-preview-font-family: var(--font-text);
--dbench-preview-font-size: var(--font-text-size);
--dbench-preview-line-height: var(--line-height-normal);
--dbench-preview-max-width: none;
--dbench-preview-paragraph-spacing: 1em;
--dbench-preview-text-align: left;
}
/* End of variables.css */
/* --------------------------------------------------------------------------
STYLE-SETTINGS.CSS (155 lines, 6.07 KB)
-------------------------------------------------------------------------- */
/*
* Style Settings manifest for Draft Bench.
*
* Parsed by the Style Settings community plugin
* (mgmeyers/obsidian-style-settings). When that plugin is installed,
* a UI under Settings → Style Settings → Draft Bench exposes the
* variables declared here, writing overrides to a body-level style
* block. The variable defaults live in variables.css; this file only
* declares the UI surface.
*
* When Style Settings isn't installed, this CSS comment block has no
* effect — the variables still have their default values, and users
* can still override via a personal CSS snippet.
*/
/* @settings
name: Draft Bench
id: draft-bench
settings:
-
id: dbench-typography-heading
title: Scene and draft typography
description: Applies to both scene and draft leaves. Scene- and draft-specific color overrides are below.
type: heading
level: 1
collapsed: false
-
id: --dbench-scene-font-family
title: Font family
description: Font for scene and draft note bodies. Use "inherit" to match your theme.
type: variable-text
default: inherit
-
id: --dbench-scene-font-size
title: Font size
description: 1em / 16px / 1.1rem / etc. Use "inherit" to match your theme.
type: variable-text
default: inherit
-
id: --dbench-scene-line-height
title: Line height
description: 1.5, 1.6, 1.8, etc. Use "inherit" to match your theme.
type: variable-text
default: inherit
-
id: --dbench-scene-max-width
title: Reading width
description: "Max content width. Only applied when Obsidian's Readable line length is on. Override to 65ch, 800px, or none for a different behavior on scene and draft leaves."
type: variable-text
default: "var(--file-line-width)"
-
id: dbench-scene-heading
title: Scene leaf
description: Scene-specific appearance.
type: heading
level: 1
collapsed: true
-
id: --dbench-scene-background
title: Background color
description: CSS color value. Use "var(--background-primary)" to match your theme.
type: variable-text
default: "var(--background-primary)"
-
id: --dbench-scene-text-color
title: Text color
description: CSS color value. Use "var(--text-normal)" to match your theme.
type: variable-text
default: "var(--text-normal)"
-
id: dbench-draft-heading
title: Draft leaf (archival)
description: Draft-specific appearance. Distinguishing archived snapshots from the live scene helps writers avoid accidentally editing archives.
type: heading
level: 1
collapsed: true
-
id: --dbench-draft-background
title: Background color
description: CSS color value. "var(--background-secondary)" gives a subtle archival tint.
type: variable-text
default: "var(--background-primary)"
-
id: --dbench-draft-text-color
title: Text color
description: CSS color value. "var(--text-muted)" dims draft text.
type: variable-text
default: "var(--text-normal)"
-
id: --dbench-draft-border-left
title: Border-left (archival cue)
description: CSS border shorthand. Default is a thin theme-muted line. Set to "none" to remove.
type: variable-text
default: "3px solid var(--text-faint)"
-
id: dbench-manuscript-builder-preview-heading
title: Manuscript Builder Preview
description: "Tunes the Preview tab in the Manuscript Builder modal. Note: Preview is for in-Obsidian review only; it is NOT a faithful render of the final compiled PDF / ODT / DOCX output (those go through different rendering pipelines). Compile to disk and open the file to check the exported result."
type: heading
level: 1
collapsed: true
-
id: --dbench-tab-active-accent
title: Tab active color
description: Underline and active-text color for the Build / Preview tab strip. Defaults to your theme's interactive accent.
type: variable-text
default: "var(--interactive-accent)"
-
id: --dbench-preview-font-family
title: Preview font family
description: Font for Preview body. Many writers prefer a serif (e.g., Crimson, Garamond, Caslon) for prose review even when their regular note font is sans-serif.
type: variable-text
default: "var(--font-text)"
-
id: --dbench-preview-font-size
title: Preview font size
description: Body font size in Preview. 1em / 16px / 1.1rem / etc.
type: variable-text
default: "var(--font-text-size)"
-
id: --dbench-preview-line-height
title: Preview line height
description: Line spacing in Preview. A major readability lever for long-form prose; 1.6 - 1.8 reads comfortably for most serifs.
type: variable-text
default: "var(--line-height-normal)"
-
id: --dbench-preview-max-width
title: Preview reading width
description: Optional max-width constraint on the Preview column. Defaults to "none" (fills the modal). Set to "45em" or similar for a constrained 65-75 character reading column.
type: variable-text
default: none
-
id: --dbench-preview-paragraph-spacing
title: Preview paragraph spacing
description: Gap between paragraphs in Preview. 1em is roughly one blank line; tighten to 0.5em for denser prose, loosen to 1.5em for airier.
type: variable-text
default: 1em
-
id: --dbench-preview-text-align
title: Preview text alignment
description: Body text alignment in Preview. "Justify" can read more book-like for serif fonts but may produce wide gaps without hyphenation.
type: variable-select
allowEmpty: false
default: left
options:
-
label: Left
value: left
-
label: Justify
value: justify
*/
/* End of style-settings.css */
/* --------------------------------------------------------------------------
BASE.CSS (40 lines, 0.75 KB)
-------------------------------------------------------------------------- */
/*
* Base utilities, animations, and shared primitives for Draft Bench.
*
* Component-specific styles live in their own files (control-center.css,
* modals.css, notes.css, etc.). This file holds only the pieces those
* components reference.
*/
/*
* Loading-state spinner animation. Reused by any loading surface
* (Control Center first-scan, picker modals, batch operations).
*/
@keyframes dbench-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.dbench-spinner {
animation: dbench-spin 1s linear infinite;
}
/*
* Utility classes. Prefixed with dbench- for namespace isolation.
* Keep minimal: prefer semantic component classes elsewhere.
*/
.dbench-hidden {
display: none;
}
.dbench-clickable {
cursor: pointer;
}
/* End of base.css */
/* --------------------------------------------------------------------------
NOTES.CSS (73 lines, 2.38 KB)
-------------------------------------------------------------------------- */
/*
* Per-note-type styling for plugin-managed editor leaves.
*
* Classes are applied by ui/leaf-styles.ts based on `dbench-type`:
* `.dbench-project`, `.dbench-scene`, `.dbench-draft` (each paired
* with its `.draft-bench-*` long-form sibling).
*
* Variables are declared at `body` scope in variables.css and
* exposed via the Style Settings manifest in style-settings.css so
* users can override them without writing a CSS snippet. Defaults
* read sensibly in Obsidian's default light and dark themes, and
* match theme vars where possible (meaning no visible change by
* default — the plugin doesn't fight the theme unless the user
* customizes).
*/
/* ---- Shared typography for scene and draft leaves ---- */
.dbench-scene .cm-editor,
.dbench-scene .markdown-preview-view,
.dbench-draft .cm-editor,
.dbench-draft .markdown-preview-view {
font-family: var(--dbench-scene-font-family);
font-size: var(--dbench-scene-font-size);
line-height: var(--dbench-scene-line-height);
}
/*
* Max-width (reading width) is gated on `body.is-readable-line-width`
* so Obsidian's "Readable line length" toggle keeps authority. When
* off, we don't apply any max-width and Obsidian's no-cap default
* stands. When on, our rule takes over at higher specificity, using
* `--dbench-scene-max-width` (default: `var(--file-line-width)`, the
* same variable Obsidian uses). Users can override our var via Style
* Settings to give scene and draft leaves a different reading width
* from the rest of their vault.
*/
body.is-readable-line-width .dbench-scene .cm-sizer,
body.is-readable-line-width .dbench-scene .markdown-preview-sizer,
body.is-readable-line-width .dbench-draft .cm-sizer,
body.is-readable-line-width .dbench-draft .markdown-preview-sizer {
max-width: var(--dbench-scene-max-width);
}
/* ---- Scene leaf colors ---- */
.dbench-scene .markdown-source-view,
.dbench-scene .markdown-reading-view {
background-color: var(--dbench-scene-background);
}
.dbench-scene .cm-editor,
.dbench-scene .markdown-preview-view {
color: var(--dbench-scene-text-color);
}
/* ---- Draft leaf colors + archival cue ---- */
.dbench-draft {
border-left: var(--dbench-draft-border-left);
}
.dbench-draft .markdown-source-view,
.dbench-draft .markdown-reading-view {
background-color: var(--dbench-draft-background);
}
.dbench-draft .cm-editor,
.dbench-draft .markdown-preview-view {
color: var(--dbench-draft-text-color);
}
/* End of notes.css */
/* --------------------------------------------------------------------------
MANUSCRIPT-BUILDER.CSS (456 lines, 14.16 KB)
-------------------------------------------------------------------------- */
/*
* Manuscript Builder modal — dedicated surface for editing a
* project's compile presets and triggering a compile run.
*
* Layout: header (title + project read-out + preset picker + buttons),
* body (stack of collapsible form sections — Metadata, Inclusion,
* Output, Content handling, Last compile).
*
* Replaces the retired Control Center modal's compile-tab content.
* Section renderers (under src/ui/manuscript-builder/sections/) use
* `.dbench-manuscript-builder__*` classes consistently with this
* file; the legacy `.dbench-compile-tab__*` namespace was retired
* with the Control Center.
*/
/*
* Modal width override. Obsidian's default modal (~600-700px) is
* too narrow for Setting rows with multi-line descriptions —
* "Destination" truncates to "Des...", descriptions wrap every few
* words. 960px gives the body comfortable room; `min(... , 92vw)`
* keeps the modal responsive on smaller viewports.
*/
.dbench-manuscript-builder-modal {
width: min(960px, 92vw);
}
/*
* Close button stacking. The sticky header inside .modal-content
* has z-index: 1 (so scrolled content doesn't bleed through its
* opaque background). Without an explicit z-index on the close
* button, the sticky header's stacking context can paint over it
* once the writer scrolls. Scoped via the modal class so we don't
* touch other plugins' modals.
*/
.dbench-manuscript-builder-modal .modal-close-button {
z-index: 2;
}
.dbench-manuscript-builder {
display: flex;
flex-direction: column;
gap: var(--dbench-spacing-lg);
}
.dbench-manuscript-builder__title {
margin: 0;
font-size: var(--h2-size);
}
/*
* Sticky region: title, project + preset header, tab strip. Pins to
* the top of the modal's scroll container so the writer can switch
* projects, presets, and tabs from any scroll position when the
* Preview tab's prose is long. Per
* docs/planning/manuscript-builder-preview.md § 6 "long-scroll
* consideration": the sticky-header pattern was flagged as a cheap
* mitigation for the deep-scroll case where the header would
* otherwise scroll out of reach.
*
* Opaque background so scrolled content doesn't show through. The
* tab strip's existing bottom border serves as the visible boundary
* between the sticky region and the scrolling body, so the sticky
* container itself doesn't need its own border.
*/
.dbench-manuscript-builder__sticky-header {
display: flex;
flex-direction: column;
gap: var(--dbench-spacing-md);
position: sticky;
top: 0;
z-index: 1;
background: var(--background-primary);
}
/*
* Dock-to-leaf button. Top-right of the sticky header, visually
* adjacent to the modal's close button. Only rendered when the
* host (currently only the modal) provides a dock handler — the
* leaf doesn't show a "convert to modal" affordance (passive
* reverse path per the #27 design ratification). `position: sticky`
* on the parent already establishes a containing block for the
* absolute positioning here.
*
* The sticky header's z-index 1 keeps the dock button above
* scrolled content; the modal close button at z-index 2 stays
* above this when scrolled to the very top.
*/
.dbench-manuscript-builder__dock-button {
position: absolute;
top: 0;
right: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
color: var(--text-muted);
background: transparent;
border: none;
border-radius: var(--dbench-radius-sm);
cursor: pointer;
}
.dbench-manuscript-builder__dock-button:hover {
color: var(--text-normal);
background: var(--background-modifier-hover);
}
.dbench-manuscript-builder__dock-button:focus-visible {
outline: 2px solid var(--interactive-accent);
outline-offset: 1px;
}
.dbench-manuscript-builder__header {
display: flex;
flex-direction: column;
gap: var(--dbench-spacing-sm);
padding-bottom: var(--dbench-spacing-md);
border-bottom: 1px solid var(--background-modifier-border);
}
.dbench-manuscript-builder__project-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--dbench-spacing-sm);
}
.dbench-manuscript-builder__project-icon {
display: inline-flex;
align-items: center;
color: var(--text-muted);
}
.dbench-manuscript-builder__project-picker {
flex: 1 1 auto;
min-width: 12em;
}
.dbench-manuscript-builder__preset-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--dbench-spacing-sm);
}
.dbench-manuscript-builder__preset-picker {
flex: 1 1 auto;
min-width: 12em;
}
.dbench-manuscript-builder__preset-empty {
flex: 1 1 auto;
color: var(--text-muted);
font-style: italic;
}
.dbench-manuscript-builder__buttons {
display: flex;
gap: var(--dbench-spacing-sm);
}
/*
* Tab strip (Build / Preview). Underline pattern per
* docs/planning/manuscript-builder-preview.md § 1: plain text labels,
* 2px accent-colored underline beneath the active tab; the strip's
* 1px bottom border is overlapped by 1px (negative margin on the
* active underline) so the active tab visually punches through the
* strip's border.
*
* --dbench-tab-active-accent is the Style Settings hook for theme
* authors who want the underline / active-text color to differ from
* Obsidian's global accent. Defaults to --interactive-accent.
*/
.dbench-manuscript-builder__tabs {
display: flex;
gap: var(--dbench-spacing-md);
border-bottom: 1px solid var(--background-modifier-border);
}
.dbench-manuscript-builder__tab {
margin: 0;
padding: 10px 16px;
border: none;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
border-radius: 0;
background: transparent;
box-shadow: none;
color: var(--text-muted);
font-size: var(--font-ui-medium);
cursor: pointer;
transition: color 0.12s, border-color 0.12s;
}
.dbench-manuscript-builder__tab:hover:not(.dbench-manuscript-builder__tab--active) {
color: var(--text-normal);
}
.dbench-manuscript-builder__tab:focus-visible {
outline: 2px solid var(--interactive-accent);
outline-offset: -2px;
}
.dbench-manuscript-builder__tab--active {
color: var(--dbench-tab-active-accent);
border-bottom-color: var(--dbench-tab-active-accent);
}
.dbench-manuscript-builder__tab-body {
display: flex;
flex-direction: column;
gap: var(--dbench-spacing-md);
}
/*
* Preview typography toolbar styling lives in styles/preview-toolbar.css
* since it is shared between the Builder Preview tab and the Manuscript
* view's Continuous mode (per docs/planning/manuscript-view-continuous-mode.md § 6).
*/
/*
* Preview tab body container. The class hook lets theme authors
* target Preview-rendered prose (serif font, justified text,
* narrower reading column, etc.) without affecting the Build tab's
* form fields. Typography is tuned via the --dbench-preview-* vars
* exposed through Style Settings (declared in variables.css, UI
* surface in style-settings.css). Per § 8 of the planning doc.
*
* Reminder: these variables tune Preview *display*, not the final
* compiled PDF / ODT / DOCX output. The compile pipelines run
* through pdfmake / docx generators on a different rendering path.
*/
.dbench-manuscript-builder__preview {
display: flex;
flex-direction: column;
max-width: var(--dbench-preview-max-width);
margin-left: auto;
margin-right: auto;
width: 100%;
font-family: var(--dbench-preview-font-family);
font-size: var(--dbench-preview-font-size);
line-height: var(--dbench-preview-line-height);
text-align: var(--dbench-preview-text-align);
}
/*
* text-align is also re-applied here because Obsidian's prose
* styling sets `text-align: start` on rendered paragraphs at a
* specificity higher than the inherited value from .__preview;
* relying on inheritance alone leaves the Style Settings
* justify / left choice ineffective.
*/
.dbench-manuscript-builder__preview .markdown-rendered p {
margin-block-end: var(--dbench-preview-paragraph-spacing);
text-align: var(--dbench-preview-text-align);
}
/*
* Rendering-state spinner. Per
* docs/planning/manuscript-builder-preview.md § 3, the spinner
* appears only when the compile + render takes longer than 250ms,
* implemented via a setTimeout cleared on completion. The icon
* reuses the shared `dbench-spinner` utility from base.css.
*/
.dbench-manuscript-builder__preview-spinner {
display: flex;
align-items: center;
justify-content: center;
gap: var(--dbench-spacing-sm);
padding: var(--dbench-spacing-xl) var(--dbench-spacing-lg);
color: var(--text-muted);
}
.dbench-manuscript-builder__preview-spinner-icon {
display: inline-flex;
align-items: center;
}
/*
* Preview empty states: no presets, no scenes, filters excluded
* everything, render error. Per
* docs/planning/manuscript-builder-preview.md § 7. Visual register
* matches the parent `__empty` block; the dedicated class hook lets
* theme authors tune Preview empty states (e.g., dim more, add
* illustration) without affecting the Build tab's empty states.
*/
.dbench-manuscript-builder__preview-empty {
display: flex;
flex-direction: column;
gap: var(--dbench-spacing-sm);
padding: var(--dbench-spacing-xl) var(--dbench-spacing-lg);
text-align: center;
color: var(--text-muted);
}
.dbench-manuscript-builder__preview-empty-message {
margin: 0;
font-weight: var(--font-semibold);
color: var(--text-normal);
}
.dbench-manuscript-builder__preview-empty-hint {
margin: 0;
font-size: var(--font-ui-small);
}
.dbench-manuscript-builder__empty {
display: flex;
flex-direction: column;
gap: var(--dbench-spacing-sm);
padding: var(--dbench-spacing-xl) var(--dbench-spacing-lg);
text-align: center;
color: var(--text-muted);
}
.dbench-manuscript-builder__empty-message {
margin: 0;
font-weight: var(--font-semibold);
color: var(--text-normal);
}
.dbench-manuscript-builder__empty-hint {
margin: 0;
font-size: var(--font-ui-small);
}
/*
* Status-filter chip layout (Inclusion section). The chip is a
* plain <label> + checkbox + text; this rule lays them out
* horizontally. Native checkbox styling carries the visual weight
* (per ui-reference.md § 0).
*/
.dbench-manuscript-builder__status-chips {
display: flex;
flex-wrap: wrap;
gap: var(--dbench-spacing-sm);
align-items: center;
}
/*
* Toggleable filter pill. Each chip wraps a visually-hidden
* <input type="checkbox"> plus the status label. Outlined by default;
* fills with a color-mix tint of the per-status `--dbench-status-<status>`
* variable when the underlying checkbox is :checked.
*
* Tinted-fill rather than full-saturation: the brand-color variables
* (#5b8cd6, #9aa0a6, #d4a443, #74b275) are mid-tone foreground colors
* that don't reach WCAG AA contrast against either white or dark text
* if used as full-saturation backgrounds. The color-mix tint pattern
* (mirroring the Manuscript view's read-only chip) keeps the brand
* color readable as text on its own tinted background, preserves
* Style Settings overrides (foreground variable change shifts both
* text and bg), and signals "selected" clearly.
*/
.dbench-manuscript-builder__status-chip {
display: inline-flex;
align-items: center;
padding: 3px var(--dbench-spacing-md);
border: 1px solid var(--background-modifier-border);
border-radius: 999px;
color: var(--text-muted);
background: transparent;
font-size: var(--font-smallest);
line-height: 1.4;
cursor: pointer;
user-select: none;
transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.dbench-manuscript-builder__status-chip-label {
text-transform: lowercase;
letter-spacing: 0.02em;
}
/* Visually hide the checkbox while keeping it focusable for screen
readers and keyboard navigation. Sits as a sibling of its paired
`.dbench-manuscript-builder__status-chip` so sibling combinators
below can transfer state. Standard sr-only pattern.
Selector specificity matters here: Obsidian's app.css ships a bare
`input[type="radio"], input[type="checkbox"]` rule (specificity
0-1-1) that sets `width` / `height` / `appearance` / etc. on every
checkbox in the renderer. A plain `.dbench-manuscript-builder__
status-chip-input` class selector is only 0-1-0, so Obsidian's rule
wins on specificity and the checkbox reappears at native size.
Wrapping with the parent class (`.status-chips input[type="checkbox"]`,
0-2-1) clears Obsidian's rule outright. */
.dbench-manuscript-builder__status-chips input[type="checkbox"] {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Hover: subtle text-color lift for unselected chips. */
.dbench-manuscript-builder__status-chip-input:not(:checked)
+ .dbench-manuscript-builder__status-chip:hover {
color: var(--text-normal);
}
/* Keyboard focus: input takes focus; sibling combinator transfers the
visual indicator to the chip. `:focus-visible` (not `:focus-within`
or plain `:focus`) preserves the keyboard-only outline. */
.dbench-manuscript-builder__status-chip-input:focus-visible
+ .dbench-manuscript-builder__status-chip {
outline: 2px solid var(--interactive-accent);
outline-offset: 2px;
}
/*
* Selected state. Per-status color is set via the data-status overrides
* below; this base rule applies the color-mix derivation pattern so any
* status that ends up with a `color` value (set or default) gets a
* matching tinted background.
*/
.dbench-manuscript-builder__status-chip-input:checked
+ .dbench-manuscript-builder__status-chip {
color: var(--dbench-status-default);
border-color: currentcolor;
background: color-mix(in srgb, currentcolor 22%, transparent);
}
.dbench-manuscript-builder__status-chip-input:checked
+ .dbench-manuscript-builder__status-chip[data-status="brainstorm"],
.dbench-manuscript-builder__status-chip-input:checked
+ .dbench-manuscript-builder__status-chip[data-status="idea"] {
color: var(--dbench-status-brainstorm);
}
.dbench-manuscript-builder__status-chip-input:checked
+ .dbench-manuscript-builder__status-chip[data-status="draft"] {
color: var(--dbench-status-draft);
}
.dbench-manuscript-builder__status-chip-input:checked
+ .dbench-manuscript-builder__status-chip[data-status="revision"] {
color: var(--dbench-status-revision);
}
.dbench-manuscript-builder__status-chip-input:checked
+ .dbench-manuscript-builder__status-chip[data-status="final"] {
color: var(--dbench-status-final);
}
/* Monospace styling for textarea inputs (e.g., excludes wikilinks). */
.dbench-manuscript-builder__monospace {
font-family: var(--font-monospace);
}
/* End of manuscript-builder.css */
/* --------------------------------------------------------------------------
PREVIEW-TOOLBAR.CSS (94 lines, 2.54 KB)
-------------------------------------------------------------------------- */
/*
* Preview typography toolbar — shared between the Manuscript Builder
* Preview tab and the Manuscript view's Continuous mode (per
* docs/planning/manuscript-view-continuous-mode.md § 6). Four controls:
* text alignment (Left / Justify), reading width (Full / Med / Narrow),
* font size (- N px +), font family dropdown. Each writes to
* plugin.settings.previewTypography and applies via inline
* `--dbench-preview-*` overrides on a host scope element.
*
* Class hooks use a neutral `dbench-preview-toolbar` block prefix so
* the same toolbar can mount in either surface without semantic drift.
*/
.dbench-preview-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--dbench-spacing-md);
padding-top: var(--dbench-spacing-sm);
border-top: 1px solid var(--background-modifier-border-hover);
}
.dbench-preview-toolbar__group {
display: inline-flex;
align-items: stretch;
border: 1px solid var(--background-modifier-border);
border-radius: var(--dbench-radius-md);
overflow: hidden;
}
.dbench-preview-toolbar__button {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 32px;
height: 28px;
padding: 0 var(--dbench-spacing-sm);
margin: 0;
border: none;
border-radius: 0;
background: transparent;
color: var(--text-muted);
font-size: var(--font-ui-small);
cursor: pointer;
box-shadow: none;
transition: color 0.12s, background 0.12s;
}
.dbench-preview-toolbar__button + .dbench-preview-toolbar__button {
border-left: 1px solid var(--background-modifier-border);
}
.dbench-preview-toolbar__button:hover:not(:disabled) {
color: var(--text-normal);
background: var(--background-modifier-hover);
}
.dbench-preview-toolbar__button:focus-visible {
outline: 2px solid var(--interactive-accent);
outline-offset: -2px;
}
.dbench-preview-toolbar__button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.dbench-preview-toolbar__button--active {
color: var(--text-on-accent);
background: var(--interactive-accent);
}
.dbench-preview-toolbar__button--active:hover:not(:disabled) {
color: var(--text-on-accent);
background: var(--interactive-accent-hover);
}
.dbench-preview-toolbar__value {
display: inline-flex;
align-items: center;
min-width: 3.5em;
padding: 0 var(--dbench-spacing-sm);
color: var(--text-muted);
font-size: var(--font-ui-small);
font-variant-numeric: tabular-nums;
border-left: 1px solid var(--background-modifier-border);
border-right: 1px solid var(--background-modifier-border);
justify-content: center;
}
.dbench-preview-toolbar__select {
height: 28px;
min-width: 11em;
}
/* End of preview-toolbar.css */
/* --------------------------------------------------------------------------
WELCOME-MODAL.CSS (94 lines, 2.21 KB)
-------------------------------------------------------------------------- */
/*
* Onboarding welcome modal. Single-screen layout: brand mark + title +
* tagline at top, pitch paragraph, three vertically-stacked CTAs, text
* link to the wiki Getting Started page in the footer.
*
* Inherit-first per ui-reference § 0: native modal chrome carries the
* modal frame, close button, and backdrop. Custom CSS is limited to
* layout (centered column, button stack), brand-mark sizing, and
* spacing. No custom colors, fonts, or borders — those follow the
* theme.
*/
.dbench-welcome-modal {
display: flex;
flex-direction: column;