-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtootoo-reference.html
More file actions
3769 lines (3312 loc) · 150 KB
/
Copy pathtootoo-reference.html
File metadata and controls
3769 lines (3312 loc) · 150 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="revised" content="2026-06-21 20:04">
<title>TooToo</title>
<link rel="icon" type="image/svg+xml"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='12' fill='%232563eb'/%3E%3Cg font-family='system-ui,sans-serif' font-size='30' font-weight='700' fill='white' text-anchor='middle' dominant-baseline='middle'%3E%3Ctext x='22' y='28'%3ET%3C/text%3E%3Ctext x='42' y='40'%3ET%3C/text%3E%3C/g%3E%3C/svg%3E">
<!-- External deps. Eager (pinned): marked → HTML (sanitized by DOMPurify),
highlight.js, DOMPurify. SheetJS (xlsx/csv; ~700KB) is NOT loaded here —
ensureXLSX() injects it on demand the first time a spreadsheet is opened.
See FORKING.md. -->
<script src="https://cdn.jsdelivr.net/npm/marked@12.0.2/marked.min.js"></script>
<link id="hljsTheme" rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dompurify@3.4.1/dist/purify.min.js"></script>
<!-- Optional per-fork config: if present, tootoo.config.js sets
window.TOOTOO_CONFIG and we merge it over CONFIG before init. -->
<script src="tootoo.config.js" onerror="void 0"></script>
<style>
/* ── Custom Properties ── */
:root {
--primary-bg: #f3f4f6;
--secondary-bg: #ffffff;
--text-color: #1f2937;
--border-color: #d1d5db;
--highlight-color: #2563eb;
--hover-bg: #e5e7eb;
--font-family: system-ui, sans-serif;
--sidebar-width: 300px;
--font-size: 16px;
--warning-bg: #fff3cd;
--warning-border: #ffc107;
--error-bg: #fff0f0;
--error-border: #dc3545;
--iframe-bg: #ffffff;
}
/* ── Dark Mode Overrides ── */
body.dark-mode {
--primary-bg: #1f2937;
--secondary-bg: #111827;
--text-color: #f3f4f6;
--border-color: #374151;
--highlight-color: #3b82f6;
--hover-bg: #374151;
--warning-bg: #3a3000;
--warning-border: #665200;
--error-bg: #2d0000;
--error-border: #ff6b6b;
}
/* ── Font size on html so rem units scale ── */
html {
font-size: var(--font-size);
/* Faintly tint scrollbars with the theme color (Chrome 121+). */
scrollbar-color: color-mix(in srgb, var(--highlight-color), transparent 65%) transparent;
}
/* ── Reset ── */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Every heading + title picks up the optional CONFIG.headingFont
(falls back to the body font when unset). */
h1,
h2,
h3,
h4,
h5,
h6,
#headerTitle {
font-family: var(--heading-font, var(--font-family));
}
/* ── Body ── */
body {
display: flex;
flex-direction: column;
height: 100vh;
margin: 0;
overflow-x: hidden;
font-family: var(--font-family);
color: var(--text-color);
background-color: var(--primary-bg);
/* Per-fork brand stripe across the very top of the viewport. */
border-top: 3px solid var(--highlight-color);
}
/* ── Header ── */
header {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--primary-bg);
border-bottom: 1px solid var(--border-color);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
z-index: 10;
}
#headerGitHub {
display: flex;
align-items: center;
/* SVG fill="currentColor" picks this up so the icon tints per-fork. */
color: var(--highlight-color);
text-decoration: none;
}
body.dark-mode #headerGitHub {
color: color-mix(in srgb, var(--highlight-color) 65%, white);
}
/* GitHub icon inside the content-header file-title (only direct <a>
child of .file-title — the breadcrumb links live inside an <h3>). */
.file-title>a {
color: var(--highlight-color);
}
body.dark-mode .file-title>a {
color: color-mix(in srgb, var(--highlight-color) 65%, white);
}
#headerTitle {
/* Normal weight so single-weight display fonts aren't synthetically bolded. */
font-weight: normal;
font-size: 1.35rem;
text-decoration: none;
color: var(--highlight-color);
cursor: pointer;
}
body.dark-mode #headerTitle {
color: color-mix(in srgb, var(--highlight-color) 65%, white);
}
/* ── Buttons ── ghost pill (theme-color text + border) that fills with
the theme color on hover, with a slight lift on press. */
.header-btn,
.file-btn,
button.primary,
button.secondary {
background: transparent;
color: var(--highlight-color);
border: 1px solid var(--highlight-color);
padding: 0.1rem 0.5rem;
border-radius: 6px;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.2s, color 0.2s, transform 0.1s;
}
.header-btn:hover,
.file-btn:hover,
button.primary:hover,
button.secondary:hover {
background: var(--highlight-color);
color: #ffffff;
transform: translateY(-1px);
}
.header-btn:active,
.file-btn:active,
button.primary:active,
button.secondary:active {
transform: translateY(0);
}
/* Dark mode: brighten the chrome color against dark backgrounds. */
body.dark-mode .header-btn,
body.dark-mode .file-btn,
body.dark-mode button.primary,
body.dark-mode button.secondary {
color: color-mix(in srgb, var(--highlight-color) 65%, white);
border-color: color-mix(in srgb, var(--highlight-color) 65%, white);
}
body.dark-mode .header-btn:hover,
body.dark-mode .file-btn:hover,
body.dark-mode button.primary:hover,
body.dark-mode button.secondary:hover {
background: color-mix(in srgb, var(--highlight-color) 65%, white);
color: var(--primary-bg);
}
/* Pressed/active state for the About (?) and ⚙️ Token toggle buttons —
same fill as hover so an open panel reads as a held-down button. */
.header-btn.active {
background: var(--highlight-color);
color: #ffffff;
}
body.dark-mode .header-btn.active {
background: color-mix(in srgb, var(--highlight-color) 65%, white);
color: var(--primary-bg);
}
.dark-mode-btn {
margin-left: auto;
}
/* Sidebar toggle (Ctrl/⌘ B): the ☰ button uses the shared .header-btn pill
style. Hide the sidebar + its resizer when collapsed so the content area
(flex: 1) fills the width. */
body.sidebar-hidden .sidebar,
body.sidebar-hidden .resizer {
display: none;
}
/* ── Rate limit badge ── */
.rate-limit-badge {
display: none;
font-size: 0.8rem;
padding: 0.2rem 0.5rem;
border-radius: 4px;
background: var(--hover-bg);
color: var(--text-color);
border: 1px solid var(--border-color);
}
.rate-limit-badge.low {
background: var(--warning-bg);
border-color: var(--warning-border);
}
.rate-limit-badge.critical {
background: var(--error-bg);
border-color: var(--error-border);
}
/* ── Main ── */
main {
display: flex;
flex-direction: row;
flex: 1;
overflow: hidden;
}
/* ── Sidebar ── */
.sidebar {
width: var(--sidebar-width);
flex-shrink: 0;
display: flex;
flex-direction: column;
background: var(--primary-bg);
padding: 0;
overflow: hidden;
container-type: inline-size;
/* enables @container queries on sidebar width */
}
/* Narrow sidebar — drop the file size onto its own line beneath the name */
@container (max-width: 220px) {
.tree-item {
flex-direction: column;
align-items: flex-start;
}
.tree-item-size {
margin-left: 0;
padding-left: 1.4rem;
/* aligns roughly with the filename text after the icon */
}
}
/* ── Panel Headers (shared) ── */
.panel-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.25rem 0.5rem;
min-height: 2.25rem;
/* lock every header bar (sidebar + content) to one height */
border-bottom: 1px solid var(--border-color);
background: var(--primary-bg);
}
.panel-header h3 {
margin: 0;
/* Normal weight so single-weight display fonts aren't synthetically bolded. */
font-size: 1rem;
font-weight: normal;
color: var(--highlight-color);
}
body.dark-mode .panel-header h3 {
color: color-mix(in srgb, var(--highlight-color) 65%, white);
}
/* Sidebar summary (folders · files · size): truncate with an ellipsis on a
narrow sidebar instead of wrapping or shoving the Expand All button off;
the full text stays available via the title tooltip. */
#hFiles {
min-width: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/* Expand/Collapse-all is a single glyph (⊞/⊟): keep it from shrinking so
the #hFiles summary is what yields on a narrow sidebar, and it can never
wrap to a second line. */
#btnExpandAll {
flex-shrink: 0;
line-height: 1;
}
/* ── Branch switcher (sidebar title) ── the branch chip opens a dropdown of
the repo's branches; the file summary sits beside it and yields first. */
#filesPanelHeader {
position: relative;
}
.files-meta {
display: flex;
align-items: center;
gap: 0.4rem;
min-width: 0;
}
.branch-switcher {
display: inline-flex;
align-items: center;
gap: 0.2rem;
flex-shrink: 0;
font-family: inherit;
font-size: 0.85rem;
padding: 0.1rem 0.4rem;
border: 1px solid var(--border-color);
border-radius: 6px;
background: transparent;
color: var(--text-color);
cursor: pointer;
white-space: nowrap;
}
.branch-switcher:hover,
.branch-switcher[aria-expanded="true"] {
border-color: var(--highlight-color);
color: var(--highlight-color);
}
.branch-glyph {
color: var(--highlight-color);
}
.branch-caret {
font-size: 0.7rem;
opacity: 0.7;
}
.branch-menu {
position: absolute;
top: 100%;
left: 0.5rem;
z-index: 20;
min-width: 12rem;
max-width: calc(100% - 1rem);
max-height: 60vh;
overflow-y: auto;
margin-top: 0.25rem;
padding: 0.25rem;
background: var(--secondary-bg);
border: 1px solid var(--border-color);
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.branch-option {
display: block;
width: 100%;
text-align: left;
padding: 0.3rem 0.5rem;
border: none;
border-radius: 4px;
background: transparent;
color: var(--text-color);
font-family: inherit;
font-size: 0.9rem;
white-space: nowrap;
cursor: pointer;
}
.branch-option:hover {
background: var(--hover-bg);
}
.branch-option.is-current {
color: var(--highlight-color);
font-weight: 600;
}
.branch-menu-loading,
.branch-menu-error {
padding: 0.5rem;
font-size: 0.85rem;
opacity: 0.8;
}
/* ── Filter wrap ── */
.filter-wrap {
position: relative;
margin: 0.4rem 0.5rem 0 0.5rem;
}
#treeFilter {
margin: 0;
width: 100%;
box-sizing: border-box;
padding: 0.3rem 1.6rem 0.3rem 0.5rem;
font-size: 0.85rem;
border: 1px solid var(--border-color);
border-radius: 4px;
background: var(--secondary-bg);
color: var(--text-color);
outline: none;
}
#treeFilter:focus {
border-color: var(--highlight-color);
}
#btnFilterClear {
position: absolute;
right: 0.3rem;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
cursor: pointer;
color: var(--text-color);
opacity: 0.5;
font-size: 0.9rem;
display: none;
padding: 0;
}
#btnFilterClear:hover {
opacity: 1;
}
/* ── Tree list ── */
#treeList {
padding: 0 0.5rem;
flex: 1;
overflow-y: auto;
}
/* ── Sidebar footer ── */
.sidebar-footer {
display: flex;
justify-content: center;
align-items: center;
padding: 0.15rem;
border-top: 1px solid var(--border-color);
background: var(--primary-bg);
flex-shrink: 0;
}
#btnScrollTreeTop {
background: none;
border: none;
padding: 0;
cursor: pointer;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.2s, transform 0.1s;
}
#btnScrollTreeTop:hover {
opacity: 0.85;
transform: translateY(-1px);
}
#btnScrollTreeTop:active {
transform: translateY(0);
}
/* ── Resizer ── */
.resizer {
width: 8px;
/* Theme color at ~25% opacity — visible as furniture, not loud. Hover
and drag jump to full theme color for clear engagement feedback. */
background: color-mix(in srgb, var(--highlight-color), transparent 75%);
cursor: col-resize;
touch-action: none;
transition: opacity 0.2s;
flex-shrink: 0;
}
.resizer:hover,
.resizer.dragging {
background: var(--highlight-color);
}
/* ── Content Area ── */
.content-area {
flex: 1;
min-width: 0;
padding: 0;
overflow-y: auto;
background: var(--secondary-bg);
position: relative;
}
#contentBody {
padding: 0 1rem 1rem 1rem;
background: var(--secondary-bg);
}
/* ── Back to Top ── */
.back-to-top {
position: fixed;
bottom: 1.5rem;
right: 1.5rem;
z-index: 20;
background-color: var(--highlight-color);
color: #ffffff;
border: none;
border-radius: 50%;
width: 2.5rem;
height: 2.5rem;
font-size: 1.2rem;
display: none;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
cursor: pointer;
align-items: center;
justify-content: center;
}
/* ── Inline repo form ── */
.repo-form {
/* Shares .markdown-body's width/rhythm, but stacks label+input in a
flex column with gap instead of block flow. */
display: flex;
flex-direction: column;
gap: 0.5rem;
max-width: 700px;
line-height: 1.6;
padding: 1rem;
word-wrap: break-word;
}
.repo-form label {
font-size: 0.9rem;
font-weight: bold;
}
.repo-form input {
padding: 0.4rem 0.5rem;
font-size: 1rem;
border: 1px solid var(--border-color);
border-radius: 4px;
background: var(--secondary-bg);
color: var(--text-color);
outline: none;
}
.repo-form input:focus {
border-color: var(--highlight-color);
}
/* ── Treeview ── */
.tree-folder {
display: flex;
align-items: center;
padding: 0.2rem 0.4rem;
cursor: pointer;
border-radius: 4px;
font-family: monospace;
font-size: 0.85rem;
user-select: none;
list-style: none;
}
.tree-folder::-webkit-details-marker {
display: none;
}
.tree-folder:hover {
background: var(--hover-bg);
}
.tree-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.2rem 0.4rem;
cursor: pointer;
border-radius: 4px;
font-family: monospace;
font-size: 0.85rem;
}
details .tree-item {
padding-left: 1.2rem;
}
.tree-item:hover {
background: var(--hover-bg);
}
.tree-item.active {
background: var(--highlight-color);
color: #fff;
}
.tree-item-size {
font-size: 0.8rem;
opacity: 0.65;
margin-left: 0.75rem;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
/* Parent-folder caption under a file name — hidden until filtering. */
.tree-item-folder {
display: none;
}
/* While the filter box has text, the sidebar becomes a flat list of just
the matching files: folder rows and indentation are dropped, the size is
hidden, and each file shows the folder it lives in. */
#treeList.filtering .tree-folder {
display: none;
}
#treeList.filtering details,
#treeList.filtering details details {
padding-left: 0;
}
#treeList.filtering details .tree-item {
padding-left: 0.4rem;
}
#treeList.filtering .tree-item {
flex-direction: column;
align-items: flex-start;
gap: 0.1rem;
}
#treeList.filtering .tree-item-size {
display: none;
}
#treeList.filtering .tree-item-folder {
display: block;
padding-left: 1.4rem;
font-size: 0.72rem;
opacity: 0.6;
}
details details {
padding-left: 0.8rem;
}
details {
padding-left: 0;
}
/* ── Content Viewer ── */
.markdown-body {
max-width: 700px;
line-height: 1.6;
word-wrap: break-word;
}
/* Tint every content heading (h1–h6) with the theme color, normal weight. */
.markdown-body :is(h1, h2, h3, h4, h5, h6) {
color: var(--highlight-color);
font-weight: normal;
}
/* Dark mode: lighten headings against dark backgrounds. */
body.dark-mode .markdown-body :is(h1, h2, h3, h4, h5, h6) {
color: color-mix(in srgb, var(--highlight-color) 65%, white);
}
.markdown-body img {
max-width: 100%;
height: auto;
}
/* Content-area links sit on the theme color — darkened in light mode
(darker on hover), brightened in dark mode — to read as actionable. */
#contentBody a {
color: color-mix(in srgb, var(--highlight-color) 80%, black);
transition: color 0.15s;
}
#contentBody a:hover {
color: color-mix(in srgb, var(--highlight-color) 50%, black);
}
body.dark-mode #contentBody a {
color: color-mix(in srgb, var(--highlight-color) 65%, white);
}
body.dark-mode #contentBody a:hover {
color: color-mix(in srgb, var(--highlight-color) 40%, white);
}
/* renderMarkdown strips href on in-page links; restore the pointer cursor. */
.markdown-body a.internal-link {
cursor: pointer;
}
pre {
max-width: 700px;
overflow-x: auto;
padding: 1rem;
border-radius: 6px;
background: var(--secondary-bg);
border: 1px solid var(--border-color);
white-space: pre-wrap;
word-wrap: break-word;
}
body.dark-mode .markdown-body {
color: var(--text-color);
}
body.dark-mode pre {
background-color: var(--secondary-bg);
}
/* ── Content area sticky header ── */
.file-header {
position: sticky;
top: 0;
z-index: 5;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
padding: 0.25rem 1rem;
/* background + min-height come from the shared .panel-header rule, so this
bar matches the sidebar header (it used to override to --secondary-bg). */
}
.file-title {
display: flex;
align-items: center;
gap: 0.5rem;
min-width: 0;
flex-wrap: nowrap;
overflow: hidden;
}
/* Breadcrumb stays on one line: the ancestor path shrinks and truncates
with an ellipsis, the file name is pinned and always shown in full. */
#breadcrumbs {
display: flex;
align-items: baseline;
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
}
.crumb-path {
flex: 0 1 auto;
min-width: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.crumb-file {
flex: 0 0 auto;
white-space: nowrap;
}
.crumb-collapsed {
cursor: default;
}
.file-title a.breadcrumb-link {
color: var(--highlight-color);
cursor: pointer;
text-decoration: none;
}
.file-title a.breadcrumb-link:hover {
text-decoration: underline;
}
.file-actions {
display: flex;
gap: 0.4rem;
align-items: center;
flex-shrink: 0;
}
.media-content {
max-width: 100%;
border-radius: 4px;
}
.iframe-content {
width: 100%;
height: 70vh;
border: 1px solid var(--border-color);
border-radius: 4px;
background: var(--iframe-bg);
}
.xlsx-sheet table {
border-collapse: collapse;
width: 100%;
margin-bottom: 1rem;
}
.xlsx-sheet td,
.xlsx-sheet th {
border: 1px solid var(--border-color);
padding: 0.3rem 0.5rem;
font-size: 0.85rem;
}
.xlsx-sheet th {
background: var(--primary-bg);
font-weight: bold;
}
/* ── Self-test report table ── */
.selftest-table {
border-collapse: collapse;
width: 100%;
font-size: 0.85rem;
}
.selftest-table th,
.selftest-table td {
border: 1px solid var(--border-color);
padding: 0.25rem 0.5rem;
text-align: left;
vertical-align: top;
}
.selftest-table td:first-child {
width: 1.5rem;
text-align: center;
}
.selftest-table tr.st-fail {
background: var(--error-bg);
}
.selftest-table tr.st-skip {
background: var(--warning-bg);
}
.md-error {
background: var(--warning-bg);
border: 1px solid var(--warning-border);
padding: 0.5rem;
border-radius: 4px;
margin-bottom: 0.5rem;
font-size: 0.85rem;
}
.error-panel {
background: var(--error-bg);
border: 2px solid var(--error-border);
color: var(--text-color);
padding: 1rem;
border-radius: 6px;
margin: 1rem;
font-size: 0.9rem;
}
.error-panel button {
margin-top: 0.5rem;
padding: 0.3rem 0.75rem;
border-radius: 6px;
border: 1px solid var(--border-color);
background: var(--secondary-bg);
cursor: pointer;
}
/* ── Responsive ── */
@media (max-width: 768px) {
.resizer {
width: 4px;
}
.file-header {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}
}
/* ── Print: only the current file's content, with its name as a title ── */
.print-only {
display: none;
}
@media print {
/* Hide all app chrome. */
header,
.sidebar,
.resizer,
.file-header,
.back-to-top,
.skip-link {
display: none !important;
}
/* The shell locks the body to one viewport with internal scrolling; undo
that so the whole document flows across printed pages. */
body,
main,
.content-area,
#contentBody {
display: block;
height: auto;
max-height: none;
overflow: visible;
}
body {
border-top: none;
}
/* drop the brand stripe */
#contentBody {
padding: 0;
}
.markdown-body,
pre {
max-width: none;
}
/* use the full page width */
/* Force a light page even if dark mode is on (legible, saves ink). */
body,
body.dark-mode {
--primary-bg: #fff;
--secondary-bg: #fff;
--text-color: #000;
--border-color: #999;
--highlight-color: #000;
background: #fff;
color: #000;
}
/* Dark-mode code blocks carry a dark hljs theme; neutralize it so code
prints as legible black-on-white (light mode keeps its syntax colors). */
body.dark-mode pre,
body.dark-mode code,
body.dark-mode .hljs,
body.dark-mode .hljs * {
background: #fff !important;
color: #000 !important;
}
/* The file name, shown only on the printout. */
.print-only {
display: block;
}
#printTitle {
margin: 0 0 1rem 0;
padding-bottom: 0.4rem;
font-size: 1.4rem;
font-weight: bold;
border-bottom: 1px solid #999;
}
}
/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
transition: none !important;
animation: none !important;
}
}
/* ── Hidden-by-filter helper ── */