@youtyan/code-viewer 0.1.13 → 0.1.15

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.
package/web/style.css CHANGED
@@ -50,6 +50,7 @@
50
50
  --topbar-h: 56px;
51
51
  --chrome-h: calc(var(--global-header-h) + var(--topbar-h));
52
52
  --sidebar-w: 308px;
53
+ --sidebar-restore-rail-w: 44px;
53
54
  /* shadows */
54
55
  --shadow-sm: 0 1px 0 rgba(31,35,40,0.04);
55
56
  --shadow-md: 0 3px 6px rgba(140,149,159,0.15);
@@ -99,6 +100,7 @@
99
100
  html, body {
100
101
  margin: 0; padding: 0;
101
102
  background: var(--bg); color: var(--fg);
103
+ --code-font-size: 12px;
102
104
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
103
105
  Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
104
106
  font-size: 14px;
@@ -109,6 +111,10 @@ html, body {
109
111
  -moz-osx-font-smoothing: auto;
110
112
  }
111
113
 
114
+ body[data-code-font-size="compact"] { --code-font-size: 11.5px; }
115
+ body[data-code-font-size="large"] { --code-font-size: 13.5px; }
116
+ body[data-code-font-size="xlarge"] { --code-font-size: 15px; }
117
+
112
118
  /* Window scrolls; global header + topbar + sidebar are fixed */
113
119
  #app { display: block; }
114
120
 
@@ -293,20 +299,18 @@ html, body {
293
299
  .app-menu {
294
300
  display: flex;
295
301
  align-items: center;
296
- gap: 18px;
302
+ gap: 8px;
297
303
  height: 100%;
298
304
  margin-left: 0;
299
305
  padding-left: 18px;
300
306
  border-left: 1px solid var(--border-muted);
301
307
  flex-shrink: 0;
302
308
  }
303
- .app-menu-item {
304
- position: relative;
309
+ .global-help-link {
305
310
  display: inline-flex;
306
311
  align-items: center;
307
- height: 100%;
312
+ height: 28px;
308
313
  padding: 0 2px;
309
- border-radius: 0;
310
314
  color: var(--fg-muted);
311
315
  font-size: 14px;
312
316
  font-weight: 600;
@@ -314,12 +318,34 @@ html, body {
314
318
  text-decoration: none;
315
319
  white-space: nowrap;
316
320
  }
321
+ .global-help-link:hover {
322
+ color: var(--accent);
323
+ text-decoration: none;
324
+ }
325
+ .global-help-link.active {
326
+ color: var(--fg);
327
+ }
328
+ .app-menu-item {
329
+ position: relative;
330
+ display: inline-flex;
331
+ align-items: center;
332
+ height: 32px;
333
+ padding: 0 10px;
334
+ border-radius: 6px;
335
+ color: var(--fg-muted);
336
+ font-size: 15px;
337
+ font-weight: 600;
338
+ line-height: 1;
339
+ text-decoration: none;
340
+ white-space: nowrap;
341
+ }
317
342
  .app-menu-item:hover {
318
343
  color: var(--accent);
344
+ background: var(--bg-mute);
319
345
  text-decoration: none;
320
346
  }
321
347
  .app-menu-item.active {
322
- background: transparent;
348
+ background: var(--bg);
323
349
  color: var(--fg);
324
350
  }
325
351
  .app-menu-item.active::after {
@@ -327,7 +353,7 @@ html, body {
327
353
  position: absolute;
328
354
  left: 0;
329
355
  right: 0;
330
- bottom: -1px;
356
+ bottom: -9px;
331
357
  height: 2px;
332
358
  border-radius: 2px 2px 0 0;
333
359
  background: var(--blob-tab-active);
@@ -337,9 +363,11 @@ html, body {
337
363
  margin-left: auto;
338
364
  display: inline-flex;
339
365
  align-items: center;
340
- gap: 12px;
366
+ gap: 8px;
367
+ flex: 0 0 auto;
341
368
  }
342
- .global-actions #theme {
369
+ .global-actions #theme,
370
+ .global-icon-action {
343
371
  display: inline-flex;
344
372
  align-items: center;
345
373
  justify-content: center;
@@ -353,10 +381,18 @@ html, body {
353
381
  font-size: 13px;
354
382
  transition: background 0.12s, border-color 0.12s;
355
383
  }
356
- .global-actions #theme:hover {
384
+ .global-icon-action svg {
385
+ display: block;
386
+ }
387
+ .global-actions #theme:hover,
388
+ .global-icon-action:hover {
357
389
  background: var(--bg-mute);
358
390
  border-color: var(--border-strong);
359
391
  }
392
+ .global-icon-action:focus-visible {
393
+ outline: 2px solid var(--accent);
394
+ outline-offset: 1px;
395
+ }
360
396
 
361
397
  #meta {
362
398
  display: flex; align-items: center; gap: 10px;
@@ -399,27 +435,70 @@ html, body {
399
435
  .ref-pickers {
400
436
  display: flex;
401
437
  align-items: center;
402
- gap: 4px;
438
+ gap: 8px;
403
439
  margin-left: 8px;
404
440
  }
405
- .ref-input {
406
- background: var(--bg-soft);
407
- border: 1px solid var(--border);
408
- color: var(--fg);
441
+ .ref-selector {
442
+ display: flex;
443
+ align-items: center;
444
+ justify-content: space-between;
445
+ flex: 0 0 auto;
446
+ gap: 8px;
447
+ width: 220px;
448
+ height: 32px;
449
+ padding: 0 12px;
450
+ border: 1px solid #d1d9e0;
409
451
  border-radius: 6px;
410
- font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
411
- font-size: 12px;
412
- padding: 4px 8px;
413
- width: 130px;
414
- height: 26px;
415
- outline: none;
416
- transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
452
+ background: #f6f8fa;
453
+ color: var(--fg);
454
+ font: 500 14px/21px -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
455
+ cursor: pointer;
456
+ transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
417
457
  }
418
- .ref-input::placeholder { color: var(--fg-subtle); }
419
- .ref-input:focus {
420
- background: var(--bg);
458
+ [data-theme="dark"] .ref-selector {
459
+ border-color: var(--border);
460
+ background: var(--bg-soft);
461
+ }
462
+ .ref-selector:hover {
463
+ border-color: var(--border-strong);
464
+ background: var(--bg-soft);
465
+ }
466
+ .ref-selector:focus-within {
421
467
  border-color: var(--accent);
422
468
  box-shadow: 0 0 0 3px var(--accent-muted);
469
+ background: var(--bg);
470
+ }
471
+ .ref-selector-icon,
472
+ .ref-selector-caret {
473
+ display: grid;
474
+ place-items: center;
475
+ flex: 0 0 auto;
476
+ width: 16px;
477
+ height: 16px;
478
+ color: var(--fg-muted);
479
+ }
480
+ .ref-selector .ref-input {
481
+ flex: 1 1 auto;
482
+ min-width: 0;
483
+ width: auto;
484
+ height: 30px;
485
+ padding: 0;
486
+ background: transparent;
487
+ border: 0;
488
+ color: var(--fg);
489
+ border-radius: 0;
490
+ font-family: inherit;
491
+ font-size: 14px;
492
+ font-weight: 500;
493
+ outline: none;
494
+ cursor: pointer;
495
+ text-overflow: ellipsis;
496
+ }
497
+ .ref-selector .ref-input::placeholder { color: var(--fg-subtle); }
498
+ .ref-selector .ref-input:focus {
499
+ background: transparent;
500
+ border-color: transparent;
501
+ box-shadow: none;
423
502
  }
424
503
  .ref-dots {
425
504
  color: var(--fg-subtle);
@@ -805,56 +884,131 @@ html, body {
805
884
  overflow-y: auto;
806
885
  padding: 0 0 32px;
807
886
  z-index: 30;
887
+ --sidebar-dir-font: 14px;
888
+ --sidebar-file-font: 12.5px;
889
+ --sidebar-stat-font: 11px;
890
+ --sidebar-row-y: 4px;
891
+ --sidebar-head-h: 58px;
892
+ }
893
+ #sidebar-toggle {
894
+ position: static;
895
+ flex: 0 0 auto;
896
+ display: inline-grid;
897
+ grid-template-columns: 16px;
898
+ place-items: center;
899
+ width: 28px;
900
+ height: 28px;
901
+ padding: 0;
902
+ border: 1px solid transparent;
903
+ border-radius: 6px;
904
+ background: transparent;
905
+ color: var(--fg-muted);
906
+ box-shadow: none;
907
+ cursor: pointer;
908
+ }
909
+ #sidebar-toggle:hover {
910
+ color: var(--fg);
911
+ background: var(--bg-mute);
912
+ }
913
+ #sidebar-toggle svg {
914
+ display: block;
915
+ }
916
+ .sidebar-toggle-label {
917
+ display: none;
918
+ }
919
+ body.gdp-sidebar-hidden #sidebar-toggle {
920
+ color: var(--fg-muted);
921
+ background: transparent;
922
+ }
923
+ body.gdp-sidebar-hidden #sidebar-toggle .sidebar-toggle-label {
924
+ display: none;
925
+ }
926
+ body.gdp-file-detail-page #sidebar-toggle,
927
+ body.gdp-repo-page #sidebar-toggle,
928
+ body.gdp-file-detail-page.gdp-sidebar-hidden #sidebar-toggle,
929
+ body.gdp-repo-page.gdp-sidebar-hidden #sidebar-toggle {
930
+ display: inline-grid;
931
+ }
932
+ body[data-sidebar-font-size="compact"] #sidebar {
933
+ --sidebar-dir-font: 13px;
934
+ --sidebar-file-font: 12px;
935
+ --sidebar-stat-font: 10.5px;
936
+ --sidebar-row-y: 3px;
937
+ }
938
+ body[data-sidebar-font-size="large"] #sidebar {
939
+ --sidebar-dir-font: 15px;
940
+ --sidebar-file-font: 14px;
941
+ --sidebar-stat-font: 12px;
942
+ --sidebar-row-y: 5px;
943
+ }
944
+ body[data-sidebar-font-size="xlarge"] #sidebar {
945
+ --sidebar-dir-font: 16px;
946
+ --sidebar-file-font: 15px;
947
+ --sidebar-stat-font: 12.5px;
948
+ --sidebar-row-y: 6px;
808
949
  }
809
950
  body[data-focus-scope="sidebar"] #sidebar {
810
- background: color-mix(in oklab, var(--bg-soft) 97%, var(--scope-accent) 3%);
811
- outline: 1px solid color-mix(in oklab, var(--scope-accent) 58%, transparent);
812
- outline-offset: -1px;
813
- box-shadow: inset -3px 0 0 var(--scope-accent);
951
+ background: var(--bg-soft);
952
+ outline: none;
953
+ box-shadow: none;
814
954
  }
815
955
  body[data-focus-scope="main"] #content {
816
- background: color-mix(in oklab, var(--bg) 98%, var(--scope-accent) 2%);
817
- outline: 1px solid color-mix(in oklab, var(--scope-accent) 58%, transparent);
818
- outline-offset: -1px;
819
- box-shadow: inset 3px 0 0 var(--scope-accent);
956
+ background: var(--bg);
957
+ outline: none;
958
+ box-shadow: none;
820
959
  }
821
960
  .sb-head {
822
- display: flex; justify-content: space-between; align-items: center;
823
- padding: 14px 16px 10px;
961
+ display: flex;
962
+ flex-wrap: wrap;
963
+ justify-content: space-between;
964
+ align-items: center;
965
+ gap: 8px;
966
+ padding: 13px 14px 10px;
967
+ min-height: var(--sidebar-head-h);
824
968
  color: var(--fg);
825
969
  font-size: 12px;
826
970
  font-weight: 600;
827
971
  position: sticky; top: 0;
828
972
  background: var(--bg-soft);
829
973
  border-bottom: 1px solid var(--border);
830
- z-index: 1;
974
+ z-index: 3;
831
975
  }
832
976
  .sb-title { letter-spacing: 0.01em; }
977
+ .sb-title,
978
+ .sb-actions,
979
+ .sb-view-seg {
980
+ flex: 0 0 auto;
981
+ }
833
982
  #totals {
834
983
  color: var(--fg-muted);
835
984
  font-weight: 400;
836
985
  font-variant-numeric: tabular-nums;
837
986
  margin-right: auto;
838
987
  margin-left: 6px;
988
+ min-width: 0;
989
+ overflow: hidden;
990
+ text-overflow: ellipsis;
991
+ white-space: nowrap;
839
992
  }
840
993
  .sb-actions {
841
994
  display: inline-flex;
842
995
  align-items: center;
843
- gap: 3px;
996
+ gap: 4px;
844
997
  margin-left: 8px;
845
- padding: 2px;
998
+ padding: 3px;
846
999
  border: 1px solid var(--border-muted);
847
- border-radius: 7px;
1000
+ border-radius: 8px;
848
1001
  background: color-mix(in srgb, var(--bg) 72%, transparent);
849
1002
  }
850
1003
  .sb-icon-action {
851
1004
  appearance: none;
852
1005
  display: grid;
853
1006
  place-items: center;
854
- width: 24px;
855
- height: 24px;
1007
+ flex: 0 0 auto;
1008
+ width: 26px;
1009
+ height: 26px;
856
1010
  border: 1px solid transparent;
857
- border-radius: 5px;
1011
+ border-radius: 6px;
858
1012
  background: transparent;
859
1013
  color: var(--fg-muted);
860
1014
  padding: 0;
@@ -872,6 +1026,10 @@ body[data-focus-scope="main"] #content {
872
1026
  opacity: 0.38;
873
1027
  cursor: default;
874
1028
  }
1029
+ .sb-actions .sb-tree-action:first-of-type {
1030
+ margin-left: 0;
1031
+ box-shadow: none;
1032
+ }
875
1033
  .sb-icon-action svg {
876
1034
  display: block;
877
1035
  }
@@ -879,11 +1037,11 @@ body[data-focus-scope="main"] #content {
879
1037
  .sb-view-seg button { padding: 0 8px; font-size: 11px; }
880
1038
  .sb-filter-wrap {
881
1039
  position: sticky;
882
- top: 36px;
1040
+ top: var(--sidebar-head-h);
883
1041
  background: var(--bg-soft);
884
1042
  padding: 6px 12px 8px;
885
1043
  border-bottom: 1px solid var(--border-muted);
886
- z-index: 1;
1044
+ z-index: 2;
887
1045
  }
888
1046
  #sb-filter {
889
1047
  width: 100%;
@@ -940,6 +1098,109 @@ body.gdp-resizing #sidebar-resizer {
940
1098
  body.gdp-resizing { cursor: col-resize !important; user-select: none; }
941
1099
  body.gdp-resizing * { user-select: none !important; }
942
1100
 
1101
+ #scope-settings-popover {
1102
+ position: fixed;
1103
+ right: 16px;
1104
+ top: calc(var(--global-header-h) + 8px);
1105
+ width: min(460px, calc(100vw - 32px));
1106
+ max-width: calc(100vw - 32px);
1107
+ z-index: 40;
1108
+ padding: 12px;
1109
+ border: 1px solid var(--border);
1110
+ border-radius: 8px;
1111
+ background: var(--bg);
1112
+ box-shadow: var(--shadow);
1113
+ }
1114
+ #scope-settings-popover[hidden] { display: none; }
1115
+ .scope-settings-head {
1116
+ display: flex;
1117
+ align-items: center;
1118
+ justify-content: space-between;
1119
+ gap: 12px;
1120
+ margin-bottom: 10px;
1121
+ }
1122
+ #scope-settings-close {
1123
+ border: 0;
1124
+ background: transparent;
1125
+ color: var(--fg-muted);
1126
+ cursor: pointer;
1127
+ font-size: 18px;
1128
+ line-height: 20px;
1129
+ }
1130
+ #scope-settings-popover label {
1131
+ display: block;
1132
+ color: var(--fg-muted);
1133
+ font-size: 12px;
1134
+ line-height: 16px;
1135
+ margin: 10px 0 6px;
1136
+ }
1137
+ .scope-settings-section-title {
1138
+ display: block;
1139
+ margin-bottom: 6px;
1140
+ color: var(--fg);
1141
+ font-size: 12px;
1142
+ }
1143
+ .scope-settings-section-title + label {
1144
+ margin-top: 0;
1145
+ }
1146
+ .scope-settings-section + .scope-settings-section {
1147
+ margin-top: 12px;
1148
+ }
1149
+ #sidebar-font-size,
1150
+ #code-font-size {
1151
+ width: 100%;
1152
+ height: 30px;
1153
+ border: 1px solid var(--border-muted);
1154
+ border-radius: 6px;
1155
+ background: var(--bg-soft);
1156
+ color: var(--fg);
1157
+ padding: 0 8px;
1158
+ font: inherit;
1159
+ font-size: 12.5px;
1160
+ }
1161
+ #scope-omit-dirs {
1162
+ box-sizing: border-box;
1163
+ width: 100%;
1164
+ min-height: 210px;
1165
+ resize: vertical;
1166
+ border: 1px solid var(--border-muted);
1167
+ border-radius: 6px;
1168
+ background: var(--bg-soft);
1169
+ color: var(--fg);
1170
+ padding: 8px;
1171
+ font: 13px/19px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
1172
+ }
1173
+ #scope-omit-source {
1174
+ margin: 8px 0 0;
1175
+ color: var(--fg-subtle);
1176
+ font-size: 11px;
1177
+ line-height: 15px;
1178
+ }
1179
+ #display-settings-source {
1180
+ margin: 8px 0 0;
1181
+ color: var(--fg-subtle);
1182
+ font-size: 11px;
1183
+ line-height: 15px;
1184
+ }
1185
+ .scope-settings-actions {
1186
+ display: flex;
1187
+ justify-content: flex-end;
1188
+ gap: 8px;
1189
+ margin-top: 10px;
1190
+ }
1191
+ .scope-settings-actions button {
1192
+ border: 1px solid var(--border-muted);
1193
+ border-radius: 6px;
1194
+ background: var(--bg-soft);
1195
+ color: var(--fg);
1196
+ padding: 4px 10px;
1197
+ cursor: pointer;
1198
+ }
1199
+ .scope-settings-actions button:hover {
1200
+ border-color: var(--border-strong);
1201
+ background: var(--bg-mute);
1202
+ }
1203
+
943
1204
  body.gdp-help-page #topbar,
944
1205
  body.gdp-help-page #sidebar,
945
1206
  body.gdp-help-page #sidebar-resizer {
@@ -1083,11 +1344,11 @@ body.gdp-help-page #content {
1083
1344
  grid-template-columns: 16px 16px minmax(0, 1fr) 22px;
1084
1345
  align-items: center;
1085
1346
  gap: 8px;
1086
- padding: 5.6px 8px 5.6px var(--lvl-pad, 12px);
1347
+ padding: calc(var(--sidebar-row-y) + 1.5px) 8px calc(var(--sidebar-row-y) + 1.5px) var(--lvl-pad, 12px);
1087
1348
  cursor: pointer;
1088
1349
  color: var(--fg);
1089
- font-size: 14px;
1090
- line-height: 21px;
1350
+ font-size: var(--sidebar-dir-font);
1351
+ line-height: calc(var(--sidebar-dir-font) + 7px);
1091
1352
  user-select: none;
1092
1353
  border-radius: 6px;
1093
1354
  }
@@ -1102,6 +1363,12 @@ body.gdp-help-page #content {
1102
1363
  #filelist.tree .tree-dir.children-omitted .dir-label {
1103
1364
  border-bottom: 1px dashed var(--border-strong);
1104
1365
  }
1366
+ #filelist.tree .tree-dir.children-omitted-heavy {
1367
+ cursor: pointer;
1368
+ }
1369
+ #filelist.tree .tree-dir.children-omitted-internal {
1370
+ cursor: default;
1371
+ }
1105
1372
  #filelist.tree .tree-dir .chev {
1106
1373
  display: flex;
1107
1374
  width: 16px;
@@ -1120,6 +1387,11 @@ body.gdp-help-page #content {
1120
1387
  width: 12px;
1121
1388
  height: 12px;
1122
1389
  }
1390
+ #filelist.tree .tree-dir .chev-spacer {
1391
+ width: 16px;
1392
+ height: 16px;
1393
+ display: inline-block;
1394
+ }
1123
1395
  #filelist.tree .tree-dir .dir-label {
1124
1396
  min-width: 0;
1125
1397
  display: flex;
@@ -1129,8 +1401,8 @@ body.gdp-help-page #content {
1129
1401
  }
1130
1402
  #filelist.tree .tree-dir .dir-name {
1131
1403
  min-width: 0;
1132
- font-size: 14px;
1133
- line-height: 21px;
1404
+ font-size: var(--sidebar-dir-font);
1405
+ line-height: calc(var(--sidebar-dir-font) + 7px);
1134
1406
  color: var(--fg);
1135
1407
  font-weight: 400;
1136
1408
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
@@ -1140,7 +1412,7 @@ body.gdp-help-page #content {
1140
1412
  }
1141
1413
  #filelist.tree .tree-dir .dir-omitted {
1142
1414
  flex: 0 0 auto;
1143
- max-width: 54px;
1415
+ max-width: 62px;
1144
1416
  overflow: hidden;
1145
1417
  text-overflow: ellipsis;
1146
1418
  border: 1px solid var(--border-muted);
@@ -1151,6 +1423,16 @@ body.gdp-help-page #content {
1151
1423
  line-height: 15px;
1152
1424
  text-transform: uppercase;
1153
1425
  }
1426
+ #filelist.tree .tree-dir .dir-omitted-heavy {
1427
+ color: var(--accent);
1428
+ border-color: var(--accent-muted);
1429
+ background: var(--accent-subtle);
1430
+ }
1431
+ #filelist.tree .tree-dir .dir-omitted-internal {
1432
+ color: var(--fg-subtle);
1433
+ border-color: var(--border-muted);
1434
+ background: var(--bg-soft);
1435
+ }
1154
1436
  #filelist.tree .tree-dir .dir-icon {
1155
1437
  color: #54aeff;
1156
1438
  flex-shrink: 0;
@@ -1171,9 +1453,9 @@ body.gdp-help-page #content {
1171
1453
  grid-template-columns: 16px 16px minmax(0, 1fr) auto;
1172
1454
  align-items: center;
1173
1455
  gap: 8px;
1174
- padding: 4px 12px 4px var(--lvl-pad, 12px);
1456
+ padding: var(--sidebar-row-y) 12px var(--sidebar-row-y) var(--lvl-pad, 12px);
1175
1457
  cursor: pointer;
1176
- font-size: 12.5px;
1458
+ font-size: var(--sidebar-file-font);
1177
1459
  color: var(--fg);
1178
1460
  border-left: 2px solid transparent;
1179
1461
  transition: background 0.10s, border-color 0.10s;
@@ -1221,11 +1503,11 @@ body.gdp-help-page #content {
1221
1503
  #filelist.tree .tree-dir.hidden { display: none; }
1222
1504
  #filelist.tree .tree-file .name {
1223
1505
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
1224
- font-size: 12.5px;
1506
+ font-size: var(--sidebar-file-font);
1225
1507
  }
1226
1508
  #filelist.tree .tree-file .stat {
1227
1509
  display: inline-flex; align-items: center; gap: 6px;
1228
- font-size: 11px;
1510
+ font-size: var(--sidebar-stat-font);
1229
1511
  font-variant-numeric: tabular-nums;
1230
1512
  }
1231
1513
  #filelist.tree .tree-file .stat .a { color: var(--success); }
@@ -1248,9 +1530,9 @@ body.gdp-help-page #content {
1248
1530
  grid-template-columns: 16px 1fr auto;
1249
1531
  align-items: center;
1250
1532
  gap: 8px;
1251
- padding: 6px 14px 6px 12px;
1533
+ padding: calc(var(--sidebar-row-y) + 2px) 14px calc(var(--sidebar-row-y) + 2px) 12px;
1252
1534
  cursor: pointer;
1253
- font-size: 12.5px;
1535
+ font-size: var(--sidebar-file-font);
1254
1536
  color: var(--fg);
1255
1537
  border-left: 2px solid transparent;
1256
1538
  transition: background 0.10s, border-color 0.10s;
@@ -1269,7 +1551,7 @@ body.gdp-help-page #content {
1269
1551
  #filelist li .name::before { content: "\200E"; }
1270
1552
  #filelist li .stat {
1271
1553
  display: inline-flex; align-items: center; gap: 6px;
1272
- font-size: 11px;
1554
+ font-size: var(--sidebar-stat-font);
1273
1555
  font-variant-numeric: tabular-nums;
1274
1556
  font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
1275
1557
  }
@@ -1472,7 +1754,7 @@ tr.gdp-hunk-row > td > .d2h-code-line,
1472
1754
  tr.gdp-hunk-row > td > .d2h-code-side-line,
1473
1755
  tr.gdp-hunk-row > td > .gdp-expand-stack {
1474
1756
  /* Stack auto-sizes: 1 button = 20px, 2 buttons (↑+↓) = 40px. */
1475
- font-size: 12px;
1757
+ font-size: var(--code-font-size);
1476
1758
  line-height: 20px;
1477
1759
  }
1478
1760
  tr.gdp-hunk-row .d2h-code-line,
@@ -1915,7 +2197,7 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
1915
2197
  border-collapse: collapse;
1916
2198
  table-layout: auto;
1917
2199
  font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
1918
- font-size: 12px;
2200
+ font-size: var(--code-font-size);
1919
2201
  line-height: 20px;
1920
2202
  }
1921
2203
  .gdp-source-table tr.gdp-source-line-target {
@@ -2101,7 +2383,7 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2101
2383
  overflow: auto;
2102
2384
  min-height: 0;
2103
2385
  font-family: "Monaspace Neon", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
2104
- font-size: 12px;
2386
+ font-size: var(--code-font-size);
2105
2387
  line-height: 20px;
2106
2388
  cursor: pointer;
2107
2389
  user-select: none;
@@ -2200,7 +2482,8 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2200
2482
  color: var(--fg);
2201
2483
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
2202
2484
  font-size: 16px;
2203
- font-weight: 400;
2485
+ font-weight: 500;
2486
+ line-height: 24px;
2204
2487
  }
2205
2488
  .gdp-file-breadcrumb-part,
2206
2489
  .gdp-file-breadcrumb-current {
@@ -2208,6 +2491,9 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2208
2491
  text-overflow: ellipsis;
2209
2492
  white-space: nowrap;
2210
2493
  }
2494
+ .gdp-file-breadcrumb-part {
2495
+ font-weight: 500;
2496
+ }
2211
2497
  .gdp-file-breadcrumb button.gdp-file-breadcrumb-part {
2212
2498
  appearance: none;
2213
2499
  border: 0;
@@ -2254,6 +2540,12 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
2254
2540
  gap: 32px;
2255
2541
  align-items: start;
2256
2542
  }
2543
+ .gdp-standalone-source .gdp-markdown-layout {
2544
+ grid-template-columns: minmax(0, 1fr);
2545
+ }
2546
+ .gdp-standalone-source .gdp-markdown-toc {
2547
+ display: none;
2548
+ }
2257
2549
  .gdp-markdown-toc {
2258
2550
  position: sticky;
2259
2551
  top: 96px;
@@ -2600,18 +2892,38 @@ body.gdp-file-detail-page.gdp-repo-blob-page #sidebar-resizer {
2600
2892
  body.gdp-repo-page #sidebar-resizer {
2601
2893
  display: block;
2602
2894
  }
2603
- #repo-target-wrap {
2895
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-title,
2896
+ body.gdp-file-detail-page.gdp-repo-blob-page #totals,
2897
+ body.gdp-repo-page .sb-title,
2898
+ body.gdp-repo-page #totals {
2604
2899
  display: none;
2605
2900
  }
2901
+ body.gdp-repo-page .sb-head,
2902
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-head {
2903
+ display: grid;
2904
+ grid-template:
2905
+ "toggle ref actions view" auto
2906
+ / 28px minmax(80px, 240px) auto auto;
2907
+ justify-content: start;
2908
+ align-items: center;
2909
+ gap: 8px;
2910
+ }
2911
+ body.gdp-repo-page .sb-head > #sidebar-toggle,
2912
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-head > #sidebar-toggle {
2913
+ grid-area: toggle;
2914
+ }
2915
+ body.gdp-repo-page #repo-target-wrap,
2606
2916
  body.gdp-file-detail-page.gdp-repo-blob-page #repo-target-wrap {
2607
- display: flex;
2917
+ grid-area: ref;
2608
2918
  }
2609
- #repo-target-wrap.sb-repo-target {
2610
- padding: 12px 12px 8px;
2611
- border-bottom: 1px solid var(--border);
2919
+ .ref-selector.ref-selector-in-grid { width: 100%; }
2920
+ body.gdp-repo-page .sb-actions,
2921
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-actions {
2922
+ grid-area: actions;
2612
2923
  }
2613
- #repo-target {
2614
- width: 100%;
2924
+ body.gdp-repo-page .sb-view-seg,
2925
+ body.gdp-file-detail-page.gdp-repo-blob-page .sb-view-seg {
2926
+ grid-area: view;
2615
2927
  }
2616
2928
  body.gdp-file-detail-page {
2617
2929
  --chrome-h: var(--global-header-h);
@@ -2644,6 +2956,19 @@ body.gdp-repo-page #content {
2644
2956
  padding: calc(var(--global-header-h) + 24px) 32px 48px;
2645
2957
  min-height: calc(100vh - var(--global-header-h));
2646
2958
  }
2959
+ body.gdp-sidebar-hidden #sidebar,
2960
+ body.gdp-sidebar-hidden #sidebar-resizer {
2961
+ display: none !important;
2962
+ }
2963
+ body.gdp-sidebar-hidden #content,
2964
+ body.gdp-sidebar-hidden.gdp-repo-page #content,
2965
+ body.gdp-sidebar-hidden.gdp-file-detail-page.gdp-repo-blob-page #content {
2966
+ margin-left: 0;
2967
+ }
2968
+ body.gdp-repo-page:not(.gdp-sidebar-hidden) .gdp-repo-toolbar > .ref-selector,
2969
+ body.gdp-file-detail-page.gdp-repo-blob-page:not(.gdp-sidebar-hidden) .gdp-file-detail-header > .ref-selector {
2970
+ display: none;
2971
+ }
2647
2972
  body.gdp-file-detail-page #diff > .gdp-file-shell:not(.gdp-standalone-source),
2648
2973
  body.gdp-file-detail-page #diff > .gdp-repo-shell,
2649
2974
  body.gdp-file-detail-page #empty {
@@ -2664,11 +2989,6 @@ body.gdp-file-detail-page #empty {
2664
2989
  padding-left: 0;
2665
2990
  padding-right: 0;
2666
2991
  }
2667
- .gdp-repo-target {
2668
- max-width: 320px;
2669
- width: 240px;
2670
- flex-shrink: 0;
2671
- }
2672
2992
  .gdp-repo-breadcrumb {
2673
2993
  flex: 1;
2674
2994
  }
@@ -2793,7 +3113,7 @@ body.gdp-file-detail-page #empty {
2793
3113
  }
2794
3114
  .d2h-code-line, .d2h-code-side-line, .d2h-code-line-ctn, .d2h-code-side-emptyplaceholder {
2795
3115
  font-family: inherit !important;
2796
- font-size: 12px !important;
3116
+ font-size: var(--code-font-size) !important;
2797
3117
  line-height: 20px !important;
2798
3118
  font-weight: 400 !important;
2799
3119
  }
@@ -2923,7 +3243,7 @@ body.gdp-file-detail-page #empty {
2923
3243
  color: var(--fg-muted) !important;
2924
3244
  border-right: 0 !important;
2925
3245
  box-shadow: inset -1px 0 0 var(--border-muted);
2926
- font-size: 12px !important;
3246
+ font-size: var(--code-font-size) !important;
2927
3247
  font-variant-numeric: tabular-nums;
2928
3248
  user-select: none;
2929
3249
  }
@@ -2932,7 +3252,7 @@ body.gdp-file-detail-page #empty {
2932
3252
  color: var(--fg-muted) !important;
2933
3253
  border-right: 0 !important;
2934
3254
  box-shadow: inset -1px 0 0 var(--border-muted);
2935
- font-size: 12px !important;
3255
+ font-size: var(--code-font-size) !important;
2936
3256
  font-variant-numeric: tabular-nums;
2937
3257
  }
2938
3258
 
@@ -3244,7 +3564,7 @@ body.gdp-file-detail-page #empty {
3244
3564
  font-style: italic;
3245
3565
  }
3246
3566
 
3247
- /* ===== Media (binary image/video) ===== */
3567
+ /* ===== Media (binary image/video/audio) ===== */
3248
3568
  .gdp-media {
3249
3569
  display: flex;
3250
3570
  gap: 16px;
@@ -3280,7 +3600,8 @@ body.gdp-file-detail-page #empty {
3280
3600
  color: var(--danger);
3281
3601
  }
3282
3602
  .gdp-media img,
3283
- .gdp-media video {
3603
+ .gdp-media video,
3604
+ .gdp-media audio {
3284
3605
  max-width: 100%;
3285
3606
  max-height: 70vh;
3286
3607
  border: 1px solid var(--border);
@@ -3295,6 +3616,12 @@ body.gdp-file-detail-page #empty {
3295
3616
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
3296
3617
  object-fit: contain;
3297
3618
  }
3619
+ .gdp-media audio {
3620
+ width: min(100%, 480px);
3621
+ max-height: none;
3622
+ padding: 8px;
3623
+ background-image: none;
3624
+ }
3298
3625
  .gdp-media .media-empty {
3299
3626
  width: 100%;
3300
3627
  min-height: 120px;