-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
1355 lines (1186 loc) · 38.5 KB
/
Copy pathstyles.css
File metadata and controls
1355 lines (1186 loc) · 38.5 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
/* Noted - app chrome + rendered Markdown content styling.
Theme is applied as data-theme="sakura"|"cherry"|"forest-brew"|"tea-mist"|
"blueberry"|"kokoblu"|"dubai" on <html> (see src/theme.ts, a popover
picker - seven themes don't fit a two-state cycle button). Cherry is the
default for a first-time visitor (no stored preference) - see
src/theme.ts's resolveInitialTheme.
Two original themes:
- Sakura (light): pink surfaces, burgundy as the darkest/text color.
- Cherry (dark): charcoal grey-black surfaces, neon pink accent, glowing
button hover.
Five later additions, palettes supplied directly by the owner (only a
handful of anchor colors given per theme - every other token below was
derived from those following the same tint/shade relationships already
established by Sakura/Cherry, e.g. -sunken/-surface/-overlay each a step
lighter, -subtle text a blend between text and background, danger/
warning/success picked to stay a distinct hue from the theme's own
accent):
- Forest Brew (dark): deep forest green surfaces, olive-lime accent/text.
- Tea Mist (light): sage-green surfaces, dark forest-green accent/text.
- Blueberry (dark): a blue-slate page background paired with a
deliberately distinct deep-plum component surface (the owner's
"Deep Surface" value - not a lightness step of the page background,
a different hue entirely), periwinkle-blue accent. Note: the owner's
exact text (#BABCD3) / background (#4B4F76) pair computes to ~4.2:1
contrast - passes WCAG AA for large/bold text (3:1) but falls just
short of the 4.5:1 body-text threshold. Shipped as given rather than
silently altered; flagged here for visibility.
- Kokoblu (dark, no glow): dark brown surfaces, steel-blue accent/text.
- Dubai (dark, no glow): near-black brown surfaces, olive-lime
accent/text.
Kokoblu/Dubai deliberately never define --ds-glow (see below) and use a
plain neutral elevation shadow rather than the brand-tinted one the
other dark themes use, per the owner's explicit "no glow effect".
The glow-on-hover treatment (`--ds-glow`, `.btn:hover` etc. further down)
was Cherry-only; it's now theme-agnostic (falls back to `none` via
`var(--ds-glow, none)`) so it naturally applies to every theme that
defines `--ds-glow` (Cherry, Forest Brew, Tea Mist, Blueberry) and skips
the ones that don't (Sakura, Kokoblu, Dubai).
(Previously a three-way light/dark/sakura cycle - dark mode was retired,
"light" was recolored and renamed to "Sakura", and the old "sakura" was
renamed to "Cherry".)
Restyled to the Atlassian Design System's visual language: its neutral/
brand color scale (Blue 500/400, Neutral N-series light / DN-series
dark), 8px-grid spacing, 3px component radius, and elevation shadows -
applied here as plain CSS custom properties, since this app stays
vanilla DOM/CSS with no framework (no @atlaskit/React dependency added -
see the ADR recorded for that scope decision). Charlie Sans, Atlassian's
actual typeface, isn't a freely embeddable web font, so the font stack
below is ADS's own documented system-font fallback chain. */
/* "Noted" wordmark font - Erica One (SIL OFL 1.1, assets/fonts/OFL.txt),
self-hosted rather than linked from Google Fonts' CDN: this app is
local-first/offline-capable (PRODUCT-SPEC.md Section 4, and the actual
offline-mode service worker - src/sw.ts) - a runtime CDN font request
would silently break both once the page itself has loaded, and would be
a network dependency this app otherwise has none of. Only the logo uses
it; body text stays on the system-font stack above. */
@font-face {
font-family: "Erica One";
src: url("assets/fonts/EricaOne-Regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
:root {
/* Sakura (default/base theme - no data-theme override needed since this
is what applies whenever data-theme="sakura" is set). Light pink,
burgundy as the darkest color. */
/* Surfaces */
--ds-surface: #fff0f5;
--ds-surface-sunken: #ffe0eb;
--ds-surface-overlay: #fff5f9;
/* Text */
--ds-text: #4a0e2e;
--ds-text-subtle: #8a4a63;
--ds-text-inverse: #fff0f5;
/* Border */
--ds-border: #f3c6d6;
--ds-border-bold: #d98aa8;
/* Brand / status */
--ds-brand-bold: #c2185b;
--ds-brand-bold-hover: #e64980;
--ds-brand-subtle: #ffd6e5;
--ds-danger: #de350b;
--ds-danger-subtle: #ffebe6;
--ds-warning: #ffab00;
--ds-success: #36b37e;
/* Code / drop zone */
--ds-code-bg: #f8e1ea;
--ds-drop-bg: #ffe4ec;
/* Elevation (Atlassian's documented "raised" shadow) */
--ds-shadow-raised: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px 1px rgba(9, 30, 66, 0.13);
/* Shape / grid */
--ds-radius: 3px;
--ds-radius-large: 8px;
--ds-focus-ring: #4c9aff;
/* .content's custom scrollbar width (styles.css's ::-webkit-scrollbar
rules) - a fixed value rather than each OS's variable default width,
so page-markers.ts can size/position its dot overlay to exactly match
without measuring it at runtime. */
--ds-scrollbar-width: 12px;
/* Back-compat aliases so any not-yet-migrated rule keeps working */
--bg: var(--ds-surface-sunken);
--surface: var(--ds-surface);
--fg: var(--ds-text);
--muted: var(--ds-text-subtle);
--border: var(--ds-border);
--accent: var(--ds-brand-bold);
--code-bg: var(--ds-code-bg);
--drop-bg: var(--ds-drop-bg);
--danger: var(--ds-danger);
}
/* Cherry - charcoal grey-black surfaces, neon pink instead of blue/rose as
the accent. Buttons additionally get a glowing pink hover effect - see
`html[data-theme="cherry"] .btn:hover` etc. below. The logo also gets
the brand-pink color here (see .app-title override further down)
instead of the theme's own (light, low-contrast-looking-white) text
color. */
html[data-theme="cherry"] {
--ds-surface: #141316;
--ds-surface-sunken: #0e0d10;
--ds-surface-overlay: #1c1a1d;
--ds-text: #ece7ea;
--ds-text-subtle: #a99aa1;
--ds-text-inverse: #141316;
--ds-border: #2c262a;
--ds-border-bold: #45383e;
--ds-brand-bold: #ff2ea6;
--ds-brand-bold-hover: #ff5ec2;
--ds-brand-subtle: #3a1230;
--ds-danger: #ff6b81;
--ds-danger-subtle: #401019;
--ds-warning: #e2b203;
--ds-success: #4bce97;
--ds-code-bg: #1c181c;
--ds-drop-bg: #2a0f22;
--ds-shadow-raised: 0 1px 1px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 46, 166, 0.16);
--ds-glow: 0 0 0 1px rgba(255, 46, 166, 0.45), 0 0 14px rgba(255, 46, 166, 0.55);
}
/* Forest Brew - deep forest green surfaces, olive-lime accent (given as
both "Text" and "Button" by the owner - deliberately the same color, not
a derivation mistake). Dark theme: subtle tints (-brand-subtle etc.) skew
dark, same convention Cherry established. */
html[data-theme="forest-brew"] {
--ds-surface: #283624;
--ds-surface-sunken: #212e1e;
--ds-surface-overlay: #324230;
--ds-text: #acc54e;
--ds-text-subtle: #8fa968;
--ds-text-inverse: #1a2416;
--ds-border: #3a4a34;
--ds-border-bold: #56684c;
--ds-brand-bold: #acc54e;
--ds-brand-bold-hover: #c3db6e;
--ds-brand-subtle: #3c4a24;
--ds-danger: #ff8a65;
--ds-danger-subtle: #3d2018;
--ds-warning: #e8c547;
--ds-success: #5fbe8d;
--ds-code-bg: #263424;
--ds-drop-bg: #2c3a28;
--ds-shadow-raised: 0 1px 1px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(172, 197, 78, 0.16);
--ds-glow: 0 0 0 1px rgba(172, 197, 78, 0.35), 0 0 14px rgba(172, 197, 78, 0.35);
}
/* Tea Mist - sage-green surfaces, dark forest-green accent (again given as
both "Text" and "Button" by the owner). Light theme: subtle tints skew
light and the elevation shadow stays the neutral Atlassian navy, same
convention Sakura established, rather than Forest Brew/Blueberry's
brand-tinted dark-theme shadow. */
html[data-theme="tea-mist"] {
--ds-surface: #d6dcbc;
--ds-surface-sunken: #cad1ab;
--ds-surface-overlay: #e3e7ce;
--ds-text: #242f21;
--ds-text-subtle: #56604e;
--ds-text-inverse: #cad1ab;
--ds-border: #b9c293;
--ds-border-bold: #9ca876;
--ds-brand-bold: #242f21;
--ds-brand-bold-hover: #3d4b37;
--ds-brand-subtle: #dce2c4;
--ds-danger: #c1502e;
--ds-danger-subtle: #f3ddd3;
--ds-warning: #b8860b;
--ds-success: #3f7d4a;
--ds-code-bg: #d2d8b7;
--ds-drop-bg: #d8debd;
--ds-shadow-raised: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px 1px rgba(9, 30, 66, 0.13);
--ds-glow: 0 0 0 1px rgba(36, 47, 33, 0.25), 0 0 14px rgba(36, 47, 33, 0.25);
}
/* Blueberry - blue-slate page background (the owner's "Background") paired
with a deliberately distinct deep-plum component surface (the owner's
"Deep Surface" - a different hue, not a lightness step of the page
background - see the file-header note on this theme's contrast too).
Primary Accent is --ds-brand-bold; Secondary Accent (a lighter tint of
it) maps to --ds-brand-bold-hover, same "hover is the lighter tint of
the base accent" relationship every other theme already uses. */
html[data-theme="blueberry"] {
--ds-surface: #411b32;
--ds-surface-sunken: #4b4f76;
--ds-surface-overlay: #5a2f49;
--ds-text: #babcd3;
--ds-text-subtle: #9799b5;
--ds-text-inverse: #411b32;
--ds-border: #5a5e82;
--ds-border-bold: #757aa3;
--ds-brand-bold: #647ebd;
--ds-brand-bold-hover: #acbadb;
--ds-brand-subtle: #2e3350;
--ds-danger: #e0708a;
--ds-danger-subtle: #3d1f2a;
--ds-warning: #d9a441;
--ds-success: #5fbe9a;
--ds-code-bg: #3e2038;
--ds-drop-bg: #453055;
--ds-shadow-raised: 0 1px 1px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(100, 126, 189, 0.16);
--ds-glow: 0 0 0 1px rgba(100, 126, 189, 0.4), 0 0 14px rgba(100, 126, 189, 0.4);
}
/* Kokoblu - dark brown surfaces, steel-blue accent/text. Explicitly no
glow: --ds-glow is never defined here, so `var(--ds-glow, none)`
(the theme-agnostic hover rule further down) falls back to `none`, same
as Sakura. The elevation shadow also stays a plain neutral black rather
than the brand-tinted ambient shadow the glow-having dark themes use. */
html[data-theme="kokoblu"] {
--ds-surface: #3a2924;
--ds-surface-sunken: #31221d;
--ds-surface-overlay: #453330;
--ds-text: #a7bdd7;
--ds-text-subtle: #8c97a3;
--ds-text-inverse: #241812;
--ds-border: #4a3a34;
--ds-border-bold: #665048;
--ds-brand-bold: #a7bdd7;
--ds-brand-bold-hover: #c3d3e6;
--ds-brand-subtle: #2e3a45;
--ds-danger: #e08566;
--ds-danger-subtle: #3d241c;
--ds-warning: #d9b054;
--ds-success: #6fbe8a;
--ds-code-bg: #362621;
--ds-drop-bg: #3c2b26;
--ds-shadow-raised: 0 1px 1px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(0, 0, 0, 0.3);
}
/* Dubai - near-black brown surfaces, olive-lime accent/text. Explicitly no
glow, same reasoning as Kokoblu above. */
html[data-theme="dubai"] {
--ds-surface: #33201c;
--ds-surface-sunken: #2a1613;
--ds-surface-overlay: #402a24;
--ds-text: #abc44f;
--ds-text-subtle: #8fa168;
--ds-text-inverse: #1f110e;
--ds-border: #43302a;
--ds-border-bold: #5e463d;
--ds-brand-bold: #abc44f;
--ds-brand-bold-hover: #c3d876;
--ds-brand-subtle: #3a431f;
--ds-danger: #e2705a;
--ds-danger-subtle: #3a2018;
--ds-warning: #d9a544;
--ds-success: #5fbe8d;
--ds-code-bg: #301f1a;
--ds-drop-bg: #362520;
--ds-shadow-raised: 0 1px 1px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(0, 0, 0, 0.3);
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
margin: 0;
background: var(--ds-surface-sunken);
color: var(--ds-text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell,
"Helvetica Neue", sans-serif;
font-size: 14px;
line-height: 1.4285714286;
-webkit-font-smoothing: antialiased;
/* The whole point of this layout: the browser window itself never
scrolls - only .content (inside each pane) does, so a long document
doesn't grow the page past the viewport. Everything from here down to
.content needs `height: 100%`/`flex: 1` + `min-height: 0` at every
level for that to actually hold - a flex/grid item's default
min-height is `auto` (= its content's natural height), which silently
overrides an explicit height and lets it grow past its container
instead of clipping/scrolling - the bug this replaces. */
overflow: hidden;
}
*:focus-visible {
outline: 2px solid var(--ds-focus-ring);
outline-offset: 1px;
}
#app {
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
.app-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 24px;
border-bottom: 1px solid var(--ds-border);
background: var(--ds-surface);
}
.app-footer {
/* Auto-hide, taskbar-style: pulled out of #app's flex flow (so .panes
fills the space it would've taken) and pinned over the bottom edge
instead, mostly translated off-screen except for an 8px sliver -
enough to show something's there and stay grabbable/hoverable, since a
fully-offscreen element can't receive the hover that's meant to bring
it back. :hover reveals it; JS (src/footer.ts) only toggles
.footer-locked on click, so it stays open without hovering - unlocking
it hands control back to plain :hover with no extra JS, so "click
again while not hovering" auto-hides for free. */
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 20;
transform: translateY(calc(100% - 8px));
transition: transform 0.2s ease;
cursor: pointer;
text-align: center;
padding: 6px;
font-size: 12px;
color: var(--ds-text-subtle);
border-top: 1px solid var(--ds-border);
background: var(--ds-surface);
}
.app-footer:hover,
.app-footer.footer-locked {
transform: translateY(0);
}
.app-footer a {
color: var(--ds-brand-bold);
text-decoration: none;
}
.app-footer a:hover {
text-decoration: underline;
}
.app-title {
font-family: "Erica One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 22px;
font-weight: 400; /* Erica One only ships a single (regular) weight */
color: var(--ds-text);
margin: 0;
}
/* Every theme but Sakura: the theme's own accent color instead of its
plain text color for the logo (Sakura keeps its own burgundy text color
here). For Forest Brew/Tea Mist this is a no-op in practice - their
accent and text colors are the same given value - but it's applied
uniformly rather than special-cased per theme. */
html[data-theme="cherry"] .app-title,
html[data-theme="forest-brew"] .app-title,
html[data-theme="tea-mist"] .app-title,
html[data-theme="blueberry"] .app-title,
html[data-theme="kokoblu"] .app-title,
html[data-theme="dubai"] .app-title {
color: var(--ds-brand-bold);
}
.header-actions {
display: flex;
gap: 8px;
}
.btn {
font: inherit;
font-weight: 500;
padding: 6px 12px;
border-radius: var(--ds-radius);
border: none;
background: var(--ds-surface-sunken);
color: var(--ds-text);
cursor: pointer;
transition: background-color 0.1s ease, box-shadow 0.15s ease;
}
.btn:hover:not(:disabled) {
background: var(--ds-border);
}
.btn:active:not(:disabled) {
background: var(--ds-border-bold);
}
/* Theme-agnostic glow-on-hover: applies whenever the active theme defines
--ds-glow (Cherry, Forest Brew, Tea Mist, Blueberry), and is a no-op
(falls back to `none`) for the ones that don't (Sakura, Kokoblu, Dubai).
Originally Cherry-only via an explicit selector list; generalized so
adding a themed variant is just "define --ds-glow or don't" rather than
also updating this rule every time. */
.btn:hover:not(:disabled),
.tab-btn:hover:not(:disabled),
.fmt-btn:hover {
box-shadow: var(--ds-glow, none);
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Icon-only header buttons (theme picker toggle, dual-window, offline) -
square, centered icon, no text. title/aria-label carry the accessible
name. */
.btn-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.25rem;
height: 2.25rem;
padding: 0;
}
/* Theme picker - same popover shape as .paragraph-style-group/-popover
(vertical list, one row per option), right-aligned instead of left since
it hangs off the header's right-most icon button rather than a
left-anchored toolbar button. */
.theme-picker {
position: relative; /* anchors .theme-popover below */
display: inline-flex;
}
#theme-toggle[aria-expanded="true"] {
background: var(--ds-border);
}
.theme-popover {
position: absolute;
top: calc(100% + 6px);
right: 0;
z-index: 5;
display: flex;
flex-direction: column;
gap: 2px;
padding: 6px;
min-width: 9rem;
background: var(--ds-surface-overlay);
border: 1px solid var(--ds-border);
border-radius: var(--ds-radius);
box-shadow: var(--ds-shadow-raised);
}
/* Same fix as .paragraph-style-popover[hidden] etc above: an explicit
`display` on this class ties in specificity with the browser's plain
`[hidden] { display: none }` rule. */
.theme-popover[hidden] {
display: none;
}
.theme-option {
display: flex;
align-items: center;
gap: 8px;
font: inherit;
text-align: left;
padding: 6px 8px;
border: none;
border-radius: var(--ds-radius);
background: transparent;
color: var(--ds-text);
cursor: pointer;
}
.theme-option:hover {
background: var(--ds-surface-sunken);
}
.theme-option svg {
flex-shrink: 0; /* keep the icon from being squeezed if a label ever wraps */
}
/* The currently-active theme's row - a persistent highlight, not just a
hover state, so re-opening the popover shows at a glance which theme is
already selected. */
.theme-option[aria-checked="true"] {
background: var(--ds-brand-subtle);
color: var(--ds-brand-bold);
font-weight: 500;
}
.panes {
flex: 1;
min-height: 0;
display: grid;
grid-auto-rows: 1fr;
gap: 16px;
padding: 16px;
overflow: hidden;
}
.panes-single {
grid-template-columns: 1fr;
}
.panes-dual {
grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) {
.panes-dual {
grid-template-columns: 1fr;
}
}
.pane {
display: flex;
flex-direction: column;
border: 1px solid var(--ds-border);
border-radius: var(--ds-radius-large);
background: var(--ds-surface);
box-shadow: var(--ds-shadow-raised);
overflow: hidden;
min-height: 20rem;
position: relative; /* anchors .page-markers (page-markers.ts) */
}
.pane-toolbar-row {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 8px;
padding: 10px 12px;
border-bottom: 1px solid var(--ds-border);
}
.file-controls {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
/* Fixed width, sized to fit the longer of "Open file…" / "Clear file" -
without this, the button visibly resized/shifted its neighbors every
time its label swapped on hover (pane.ts's mouseenter/mouseleave). */
.browse-btn {
min-width: 6.5rem;
text-align: center;
}
.file-name {
color: var(--ds-text-subtle);
font-size: 12px;
max-width: 14rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer; /* click anywhere (base or locked extension) to rename the base - pane.ts - harmless no-op on "No file loaded" */
border-radius: var(--ds-radius);
padding: 2px 4px;
margin: -2px -4px; /* padding without shifting neighboring layout */
}
/* Only .file-name-base ever becomes contentEditable - .file-name-ext
(the locked extension, e.g. ".md") never does, so it can't be edited
even if a click happens to land directly on it. */
.file-name-base[contenteditable="true"] {
cursor: text;
background: var(--ds-surface-sunken);
outline: 1px solid var(--ds-brand-bold);
padding: 0 2px;
border-radius: var(--ds-radius);
}
.file-name-ext {
opacity: 0.75; /* visually reads as "fixed," not part of what you just clicked into */
}
.tabs {
display: flex;
gap: 4px;
background: var(--ds-surface-sunken);
padding: 2px;
border-radius: var(--ds-radius);
}
.tab-btn {
font: inherit;
font-weight: 500;
padding: 4px 14px;
border-radius: var(--ds-radius);
border: none;
background: transparent;
color: var(--ds-text-subtle);
cursor: pointer;
transition: color 0.1s ease, box-shadow 0.15s ease;
}
.tab-btn:hover:not(:disabled) {
color: var(--ds-text);
}
.tab-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.tab-btn.active {
background: var(--ds-surface);
color: var(--ds-brand-bold);
box-shadow: var(--ds-shadow-raised);
}
.edit-toolbar {
display: flex;
align-items: center;
gap: 4px;
padding: 8px 12px;
border-bottom: 1px solid var(--ds-border);
background: var(--ds-surface-sunken);
}
/* `display: flex` above beats the browser's default `[hidden] { display:
none }` rule (author styles win over the UA stylesheet), so without this
the toolbar stays visible even when Pane.setMode("view") sets the
`hidden` attribute. This restores hidden's effect for this element. */
.edit-toolbar[hidden] {
display: none;
}
.fmt-btn {
width: 2rem;
height: 2rem;
border-radius: var(--ds-radius);
border: none;
background: var(--ds-surface);
color: var(--ds-text);
cursor: pointer;
transition: background-color 0.1s ease, box-shadow 0.15s ease;
}
.fmt-btn:hover {
background: var(--ds-border);
}
.highlight-group {
position: relative; /* anchors .highlight-popover below */
display: flex;
align-items: center;
margin-left: 8px;
padding-left: 8px;
border-left: 1px solid var(--ds-border);
}
.highlight-toggle[aria-expanded="true"] {
background: var(--ds-border);
}
/* 18 colors (+ remove) don't fit inline in the toolbar row - a popover
grid, opened by .highlight-toggle (pane.ts), closed on selecting a
color or clicking anywhere outside it. */
.highlight-popover {
position: absolute;
top: calc(100% + 6px);
left: 0;
z-index: 5;
display: grid;
grid-template-columns: repeat(6, 1.25rem);
gap: 6px;
padding: 10px;
background: var(--ds-surface-overlay);
border: 1px solid var(--ds-border);
border-radius: var(--ds-radius);
box-shadow: var(--ds-shadow-raised);
}
/* Same fix as .edit-toolbar[hidden] above: an explicit `display` on this
class ties in specificity with the browser's plain `[hidden] { display:
none }` rule, and being later in the cascade would otherwise win -
keeping the popover visible even when `hidden` is set. */
.highlight-popover[hidden] {
display: none;
}
.highlight-swatch {
width: 1.25rem;
height: 1.25rem;
border-radius: 50%;
border: 1px solid rgba(9, 30, 66, 0.13);
cursor: pointer;
padding: 0;
}
.highlight-swatch:hover {
transform: scale(1.15);
}
.highlight-none {
grid-column: 1 / -1; /* full-width row of its own, set apart from the color grid */
width: auto;
height: 1.5rem;
border-radius: var(--ds-radius);
background: var(--ds-surface-sunken);
color: var(--ds-text-subtle);
font-size: 0.85rem;
line-height: 1;
}
.drop-zone {
margin: 16px;
padding: 2rem 1rem;
border: 2px dashed var(--ds-border-bold);
border-radius: var(--ds-radius-large);
text-align: center;
color: var(--ds-text-subtle);
background: var(--ds-drop-bg);
cursor: pointer; /* also click-to-create-new-file (pane.ts), not just a drop target */
}
.drop-zone:hover,
.drop-zone:focus-visible {
border-color: var(--ds-brand-bold);
color: var(--ds-text);
}
.drop-zone.drag-over {
border-color: var(--ds-brand-bold);
color: var(--ds-text);
}
.content {
flex: 1;
min-height: 0; /* let it actually scroll instead of growing past the pane */
padding: 16px 20px;
overflow: auto;
outline: none;
scrollbar-color: var(--ds-border-bold) transparent; /* Firefox */
scrollbar-width: thin;
}
.content[contenteditable="true"] {
background: var(--ds-surface-sunken);
}
/* Sandboxed live-HTML viewer (a loaded .html file - see file-loader.ts's
module doc comment and PRODUCT-DECISIONS.md ADR-011) - a plain iframe,
not styled/scrolled like .content, since the loaded document controls
its own layout/scrolling/background entirely. */
.content-frame {
flex: 1;
min-height: 0;
border: none;
background: #fff;
}
/* Chromium-only (this app's target, ADR-0003) scrollbar styling - a
consistent, slim, rounded, theme-colored scrollbar rather than each OS's
default chrome, so the page-marker dots (page-markers.ts) read as part
of one deliberate scrollbar rather than an overlay on top of a mismatched
native one. */
.content::-webkit-scrollbar {
width: var(--ds-scrollbar-width);
}
.content::-webkit-scrollbar-track {
background: var(--ds-surface-sunken);
}
.content::-webkit-scrollbar-thumb {
background: var(--ds-border-bold);
border-radius: var(--ds-radius-large);
border: 3px solid var(--ds-surface-sunken);
}
.content::-webkit-scrollbar-thumb:hover {
background: var(--ds-brand-bold);
}
/* A4-page markers (page-markers.ts) - a thin overlay positioned exactly
over .content's scrollbar track (same width as --ds-scrollbar-width, same
right edge), so the dots read as embedded in the scrollbar rather than a
separate strip next to it. pointer-events:none on the track itself so it
never blocks scrolling/dragging the real thumb underneath; individual
dots re-enable pointer-events so they're still hoverable. */
.page-markers {
position: absolute;
right: 0;
width: var(--ds-scrollbar-width);
pointer-events: none;
z-index: 1;
}
.page-marker-dot {
position: absolute;
left: 50%;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--ds-brand-bold);
border: 1px solid var(--ds-surface-sunken);
transform: translate(-50%, -50%);
pointer-events: auto;
cursor: default;
}
.export-controls {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 12px;
border-bottom: 1px solid var(--ds-border);
background: var(--ds-surface-sunken);
}
.export-controls .copy-btn {
margin-left: auto;
}
/* Export is a popover, same pattern as .highlight-group/.highlight-popover
(see those rules) - .html/.pdf/.docx/.json used to be four always-visible
buttons; now a single "Export" toggle (styled like the Copy button next
to it, not uppercased - plain sentence case) opens a small menu. */
.export-group {
position: relative; /* anchors .export-popover below */
}
.export-popover {
position: absolute;
top: 50%;
left: calc(100% + 6px); /* beside the toggle button, not underneath it (was blocking the content below) */
transform: translateY(-50%); /* vertically centered on the button, not top-aligned (read as slightly low/offset) */
z-index: 5;
display: flex;
flex-direction: row; /* horizontal row of formats */
gap: 4px;
padding: 6px;
background: var(--ds-surface-overlay);
border: 1px solid var(--ds-border);
border-radius: var(--ds-radius);
box-shadow: var(--ds-shadow-raised);
white-space: nowrap;
}
/* Same fix as .edit-toolbar[hidden]/.highlight-popover[hidden] above: an
explicit `display` on this class ties in specificity with the browser's
plain `[hidden] { display: none }` rule. */
.export-popover[hidden] {
display: none;
}
/* ---- Paragraph style (H1-H6 / Body) popover, edit toolbar - Obsidian's
font-size/paragraph-style setting. A vertical dropdown list (unlike the
export popover's horizontal row) since each entry is a differently-sized
label read top-to-bottom, same shape as Obsidian's own dropdown. */
.paragraph-style-group {
position: relative; /* anchors .paragraph-style-popover below */
display: flex;
align-items: center;
}
.paragraph-style-toggle[aria-expanded="true"] {
background: var(--ds-border);
}
.paragraph-style-popover {
position: absolute;
top: calc(100% + 6px);
left: 0;
z-index: 5;
display: flex;
flex-direction: column;
gap: 2px;
padding: 6px;
min-width: 6rem;
background: var(--ds-surface-overlay);
border: 1px solid var(--ds-border);
border-radius: var(--ds-radius);
box-shadow: var(--ds-shadow-raised);
}
/* Same fix as .edit-toolbar[hidden] etc above: an explicit `display` on
this class ties in specificity with the browser's plain `[hidden] {
display: none }` rule. */
.paragraph-style-popover[hidden] {
display: none;
}
.paragraph-style-btn {
font: inherit;
text-align: left;
padding: 4px 8px;
border: none;
border-radius: var(--ds-radius);
background: transparent;
color: var(--ds-text);
cursor: pointer;
}
.paragraph-style-btn:hover {
background: var(--ds-surface-sunken);
}
/* ---- Rendered Markdown content styling (both themes via variables) ---- */
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
font-weight: 600;
line-height: 1.25;
margin-top: 1.4em;
margin-bottom: 0.5em;
color: var(--ds-text);
}
.content h1:first-child,
.content h2:first-child,
.content h3:first-child {
margin-top: 0;
}
.content a {
color: var(--ds-brand-bold);
text-decoration: none;
}
.content a:hover {
text-decoration: underline;
}
.content blockquote {
margin: 1rem 0;
padding: 0.25rem 1rem;
border-left: 4px solid var(--ds-border-bold);
color: var(--ds-text-subtle);
}
.content code {
background: var(--ds-code-bg);
padding: 0.15em 0.35em;
border-radius: var(--ds-radius);
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
font-size: 0.9em;
}
.content pre {
background: var(--ds-code-bg);
padding: 1rem;
border-radius: var(--ds-radius);
overflow-x: auto;