@vscode/markdown-editor 0.0.2-13 → 0.0.2-130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +644 -0
  2. package/dist/commands.d.ts +67 -0
  3. package/dist/commands.js +185 -0
  4. package/dist/commands.js.map +1 -0
  5. package/dist/config-BGeaJqWk.js +286 -0
  6. package/dist/config-BGeaJqWk.js.map +1 -0
  7. package/dist/config.d.ts +10 -0
  8. package/dist/config.js +6 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/index.d.ts +1611 -270
  11. package/dist/index.js +7839 -3291
  12. package/dist/index.js.map +1 -1
  13. package/dist/markdown-editor.css +1 -1
  14. package/dist/scrolling-C4GW1cCQ.js +391 -0
  15. package/dist/scrolling-C4GW1cCQ.js.map +1 -0
  16. package/dist/web-editors.d.ts +353 -0
  17. package/dist/web-editors.js +7525 -0
  18. package/dist/web-editors.js.map +1 -0
  19. package/package.json +59 -19
  20. package/src/contrib/comments/commentInput.css +38 -80
  21. package/src/contrib/comments/commentWidget.css +60 -0
  22. package/src/contrib/find/find.css +347 -0
  23. package/src/contrib/rename/rename.css +73 -0
  24. package/src/contrib/suggest/suggest.css +109 -0
  25. package/src/view/editor.css +1677 -111
  26. package/src/view/themes/default.css +21 -4
  27. package/src/view/themes/github.css +25 -13
  28. package/src/view/themes/vscode-default.css +98 -23
  29. package/src/view/themes/vscode-github.css +84 -15
  30. package/dist/_observables/assert.d.ts +0 -2
  31. package/dist/_observables/deps.d.ts +0 -28
  32. package/dist/_observables/disposables.d.ts +0 -19
  33. package/dist/_observables/equals.d.ts +0 -32
  34. package/dist/_observables/index.d.ts +0 -2
  35. package/dist/_observables/observableInternal/base.d.ts +0 -172
  36. package/dist/_observables/observableInternal/changeTracker.d.ts +0 -44
  37. package/dist/_observables/observableInternal/commonFacade/cancellation.d.ts +0 -24
  38. package/dist/_observables/observableInternal/commonFacade/deps.d.ts +0 -24
  39. package/dist/_observables/observableInternal/debugLocation.d.ts +0 -21
  40. package/dist/_observables/observableInternal/debugName.d.ts +0 -33
  41. package/dist/_observables/observableInternal/experimental/deferUnobserve.d.ts +0 -16
  42. package/dist/_observables/observableInternal/experimental/reducer.d.ts +0 -37
  43. package/dist/_observables/observableInternal/experimental/utils.d.ts +0 -15
  44. package/dist/_observables/observableInternal/index.d.ts +0 -25
  45. package/dist/_observables/observableInternal/logging/consoleObservableLogger.d.ts +0 -40
  46. package/dist/_observables/observableInternal/logging/debugGetDependencyGraph.d.ts +0 -4
  47. package/dist/_observables/observableInternal/logging/debugger/debuggerRpc.d.ts +0 -4
  48. package/dist/_observables/observableInternal/logging/debugger/devToolsLogger.d.ts +0 -43
  49. package/dist/_observables/observableInternal/logging/debugger/rpc.d.ts +0 -41
  50. package/dist/_observables/observableInternal/logging/debugger/utils.d.ts +0 -13
  51. package/dist/_observables/observableInternal/logging/logging.d.ts +0 -30
  52. package/dist/_observables/observableInternal/map.d.ts +0 -18
  53. package/dist/_observables/observableInternal/observables/baseObservable.d.ts +0 -58
  54. package/dist/_observables/observableInternal/observables/constObservable.d.ts +0 -5
  55. package/dist/_observables/observableInternal/observables/derived.d.ts +0 -46
  56. package/dist/_observables/observableInternal/observables/derivedImpl.d.ts +0 -83
  57. package/dist/_observables/observableInternal/observables/lazyObservableValue.d.ts +0 -27
  58. package/dist/_observables/observableInternal/observables/observableFromEvent.d.ts +0 -37
  59. package/dist/_observables/observableInternal/observables/observableSignal.d.ts +0 -11
  60. package/dist/_observables/observableInternal/observables/observableSignalFromEvent.d.ts +0 -5
  61. package/dist/_observables/observableInternal/observables/observableValue.d.ts +0 -37
  62. package/dist/_observables/observableInternal/observables/observableValueOpts.d.ts +0 -8
  63. package/dist/_observables/observableInternal/reactions/autorun.d.ts +0 -56
  64. package/dist/_observables/observableInternal/reactions/autorunImpl.d.ts +0 -53
  65. package/dist/_observables/observableInternal/set.d.ts +0 -17
  66. package/dist/_observables/observableInternal/transaction.d.ts +0 -27
  67. package/dist/_observables/observableInternal/utils/promise.d.ts +0 -75
  68. package/dist/_observables/observableInternal/utils/runOnChange.d.ts +0 -7
  69. package/dist/_observables/observableInternal/utils/utils.d.ts +0 -43
  70. package/dist/_observables/observableInternal/utils/utilsCancellation.d.ts +0 -10
  71. package/dist/_observables/observableInternal/utils/valueWithChangeEvent.d.ts +0 -10
  72. package/dist/_observables/utils.d.ts +0 -15
  73. package/dist/observables.d.ts +0 -4
  74. package/dist/observables.js +0 -439
  75. package/dist/observables.js.map +0 -1
  76. package/dist/runOnChange-C00UIwqQ.js +0 -1538
  77. package/dist/runOnChange-C00UIwqQ.js.map +0 -1
  78. package/src/contrib/comments/comments.css +0 -129
  79. package/src/contrib/commentsVscode/vscodeCommentWidgetV2.css +0 -166
@@ -1,3 +1,6 @@
1
+ @import '@vscode/codicons/dist/codicon.css';
2
+ @import '../contrib/find/find.css';
3
+
1
4
  /*
2
5
  * Base editor styles — ABSOLUTE MINIMUM.
3
6
  *
@@ -22,11 +25,127 @@
22
25
  */
23
26
 
24
27
  .md-editor {
28
+ --md-marker-font-family: 'Cascadia Code', 'Fira Code', monospace;
29
+ --md-marker-font-scale: 0.85;
30
+ --md-readonly-toggle-width: 58px;
31
+ --md-readonly-toggle-height: 32px;
32
+ --md-readonly-toggle-inset: 8px;
33
+ display: flow-root;
34
+ min-height: 100%;
25
35
  outline: none;
26
36
  /* The editor paints its own cursor (`.md-cursor`); hide the native caret. */
27
37
  caret-color: transparent;
28
38
  }
29
39
 
40
+ .md-iframe-toolbar,
41
+ .md-iframe-resize-handle {
42
+ position: absolute;
43
+ box-sizing: border-box;
44
+ pointer-events: auto;
45
+ background: var(--md-iframe-background, #fff);
46
+ color: var(--md-iframe-foreground, #616161);
47
+ }
48
+
49
+ .md-iframe-toolbar:not([hidden]) {
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: flex-end;
53
+ gap: 2px;
54
+ padding: 2px 4px;
55
+ border: 1px solid var(--md-iframe-border, #e5e5e5);
56
+ border-radius: 5px;
57
+ width: max-content;
58
+ transform: translateX(-100%);
59
+ opacity: 0;
60
+ }
61
+
62
+ .md-iframe-frame:hover + .md-iframe-toolbar,
63
+ .md-iframe-toolbar:hover,
64
+ .md-iframe-toolbar:focus-within,
65
+ .md-iframe-toolbar:has(.md-code-block-copy-feedback),
66
+ .md-iframe-toolbar.md-iframe-toolbar-full-view {
67
+ opacity: 1;
68
+ }
69
+
70
+ .md-iframe-toolbar > .md-code-block-actions {
71
+ position: static;
72
+ height: auto;
73
+ margin: 0;
74
+ padding: 0;
75
+ opacity: 1;
76
+ order: 1;
77
+ }
78
+
79
+ .md-iframe-toolbar .md-code-block-copy-status:not(:empty) {
80
+ position: absolute;
81
+ top: 100%;
82
+ right: 0;
83
+ margin-top: 4px;
84
+ white-space: nowrap;
85
+ }
86
+
87
+ @media (hover: none) {
88
+ .md-iframe-toolbar:not([hidden]) {
89
+ opacity: 1;
90
+ }
91
+ }
92
+
93
+ .md-iframe-toolbar button,
94
+ .md-iframe-toolbar .md-code-block-copy {
95
+ background: transparent;
96
+ color: inherit;
97
+ border: none;
98
+ border-radius: 3px;
99
+ width: 22px;
100
+ height: 22px;
101
+ padding: 3px;
102
+ cursor: pointer;
103
+ }
104
+
105
+ .md-iframe-toolbar button:not([hidden]) {
106
+ display: grid;
107
+ place-items: center;
108
+ }
109
+
110
+ .md-iframe-toolbar button:hover,
111
+ .md-iframe-toolbar button[aria-pressed=true] {
112
+ background: var(--md-iframe-hover-background, rgba(128, 128, 128, 0.12));
113
+ }
114
+
115
+ .md-iframe-toolbar button:focus-visible,
116
+ .md-iframe-resize-handle:focus-visible {
117
+ outline: 1px solid var(--md-iframe-focus-border, #007acc);
118
+ outline-offset: -1px;
119
+ }
120
+
121
+ .md-iframe-resize-handle {
122
+ cursor: ns-resize;
123
+ touch-action: none;
124
+ }
125
+
126
+ .md-iframe-resize-handle::after {
127
+ content: '';
128
+ display: block;
129
+ width: 32px;
130
+ height: 2px;
131
+ margin: 2px auto;
132
+ border-radius: 1px;
133
+ background: currentColor;
134
+ opacity: 0.35;
135
+ }
136
+
137
+ .md-editor-a11y-status {
138
+ position: absolute;
139
+ width: 1px;
140
+ height: 1px;
141
+ padding: 0;
142
+ margin: -1px;
143
+ overflow: hidden;
144
+ clip: rect(0, 0, 0, 0);
145
+ white-space: nowrap;
146
+ border: 0;
147
+ }
148
+
30
149
  /*
31
150
  * The transient empty paragraph — the blank line conjured by pressing Enter at
32
151
  * the end of a paragraph (see `PendingParagraph` in the model). It is not part
@@ -42,20 +161,66 @@
42
161
  * overlays, which position themselves relative to this box, so it is the
43
162
  * positioning context. In limited-width mode the editor sets an inline
44
163
  * `max-width` here and the auto inline margins center it within the full-width
45
- * `.md-editor`.
164
+ * `.md-editor`. The block-start padding keeps every document clear of the top
165
+ * edge, independent of the first block's theme margins.
46
166
  */
47
167
  .md-editor-content {
168
+ --md-editor-min-inline-padding: 8px;
169
+ --md-editor-content-inline-start-padding: var(--md-editor-min-inline-padding);
170
+ --md-editor-content-inline-end-padding: var(--md-editor-content-inline-start-padding);
48
171
  position: relative;
172
+ display: flow-root;
49
173
  margin-inline: auto;
50
- padding: 0 48px;
174
+ padding-block: 32px 0;
175
+ padding-inline: var(--md-editor-content-inline-start-padding) var(--md-editor-content-inline-end-padding);
51
176
  }
52
177
 
53
- .md-block-active {
178
+ .md-editor-medium-margins > .md-editor-content {
179
+ --md-editor-content-inline-start-padding: max(var(--md-editor-min-inline-padding), 48px);
180
+ }
181
+
182
+ .md-editor-content:has(> .md-document > .md-heading) {
183
+ --md-editor-min-inline-padding: 2em;
184
+ }
185
+
186
+ .md-editor-content>.md-document :is(.md-heading, .md-paragraph) {
187
+ overflow-wrap: anywhere;
188
+ }
189
+
190
+ .md-editor .md-document > :first-child,
191
+ .md-editor .md-blockquote > :nth-child(1 of .md-block) {
192
+ margin-block-start: 0;
193
+ }
194
+
195
+ :where(.md-editor:not(.md-no-active-block-highlight)) .md-block-active {
54
196
  background: var(--md-block-active-background, #f8f8f8);
55
197
  border-radius: 4px;
56
198
  box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
57
199
  }
58
200
 
201
+ /*
202
+ * The whole-empty-document case. Markdown has no empty-paragraph node, so a
203
+ * document with no content parses to a single empty paragraph (see
204
+ * `_ensureBlocks` in the parser) which renders as a childless `<p>` of zero
205
+ * height. Give it one line's height so the editor presents an intentional,
206
+ * clickable empty editing surface — and so typing the first character causes no
207
+ * layout shift (a filled line is also one `lh` tall).
208
+ */
209
+ .md-paragraph:empty {
210
+ min-height: 1lh;
211
+ }
212
+
213
+ /*
214
+ * ...and never paint the active-block card over that zero-content line: with no
215
+ * text to size it, the card's background + 8px box-shadow glow would show up as
216
+ * a stray gray bar. The two extra classes outrank the base `.md-block-active`
217
+ * rule above in every theme (themes only remap `--md-block-active-background`).
218
+ */
219
+ .md-paragraph:empty.md-block-active {
220
+ background: transparent;
221
+ box-shadow: none;
222
+ }
223
+
59
224
  /*
60
225
  * Cursor mirrors the same open affordance as the underline below: the anchor's
61
226
  * pointer cursor appears exactly when a click would open the link. An inactive
@@ -87,6 +252,560 @@
87
252
  text-decoration: none;
88
253
  }
89
254
 
255
+ .md-rich-link {
256
+ display: inline-flex;
257
+ align-items: baseline;
258
+ max-width: min(100%, var(--md-rich-link-line-width, 52rem));
259
+ box-sizing: border-box;
260
+ gap: 0.24em;
261
+ padding: 1px 0.3em;
262
+ border: 1px solid color-mix(in srgb, var(--vscode-textLink-foreground, #0969da) 24%, transparent);
263
+ border-radius: 0.3em;
264
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
265
+ color: inherit;
266
+ font-size: 1em;
267
+ line-height: 1.25;
268
+ text-decoration: none;
269
+ vertical-align: baseline;
270
+ white-space: nowrap;
271
+ cursor: pointer;
272
+ --md-rich-link-success-color: var(--vscode-charts-green, #1f883d);
273
+ }
274
+
275
+ .md-rich-link:hover {
276
+ border-color: var(--vscode-focusBorder, color-mix(in srgb, currentColor 42%, transparent));
277
+ background: var(--vscode-button-secondaryHoverBackground, #e5e5e5);
278
+ text-decoration: none;
279
+ }
280
+
281
+ .md-rich-link:focus-visible {
282
+ outline: 1px solid var(--vscode-focusBorder, currentColor);
283
+ outline-offset: 1px;
284
+ }
285
+
286
+ .md-rich-link-icon {
287
+ flex: none;
288
+ align-self: center;
289
+ font-size: 0.92em;
290
+ color: color-mix(in srgb, var(--vscode-textLink-foreground, #0969da) 78%, currentColor);
291
+ }
292
+
293
+ .md-rich-link-label,
294
+ .md-rich-link-title,
295
+ .md-rich-link-detail {
296
+ overflow: hidden;
297
+ text-overflow: ellipsis;
298
+ }
299
+
300
+ .md-rich-link-label,
301
+ .md-rich-link-title {
302
+ flex: 0 1 auto;
303
+ min-width: 0;
304
+ color: var(--vscode-textLink-foreground, currentColor);
305
+ font-weight: 600;
306
+ }
307
+
308
+ .md-rich-link-title {
309
+ max-width: var(--md-rich-link-title-width, 200px);
310
+ }
311
+
312
+ .md-rich-link-label {
313
+ max-width: var(--md-rich-link-title-width, none);
314
+ }
315
+
316
+ .md-rich-link[data-md-rich-link-kind='session'] :is(.md-rich-link-label, .md-rich-link-title) {
317
+ max-width: var(--md-rich-link-title-width, 150px);
318
+ }
319
+
320
+ .md-rich-link-line-end {
321
+ --md-rich-link-title-width: none;
322
+ }
323
+
324
+ .md-rich-link-label[hidden],
325
+ .md-rich-link-title[hidden],
326
+ .md-rich-link-reference[hidden] {
327
+ display: none;
328
+ }
329
+
330
+ .md-rich-link-reference {
331
+ flex: none;
332
+ color: var(--vscode-descriptionForeground, color-mix(in srgb, currentColor 72%, transparent));
333
+ font-size: 0.92em;
334
+ }
335
+
336
+ .md-rich-link-detail {
337
+ flex: 1 1 auto;
338
+ min-width: 1.5em;
339
+ color: var(--vscode-descriptionForeground, color-mix(in srgb, currentColor 72%, transparent));
340
+ font-size: 0.92em;
341
+ }
342
+
343
+ .md-rich-link-detail::before {
344
+ content: '·';
345
+ margin-right: 0.28em;
346
+ }
347
+
348
+ .md-rich-link-status {
349
+ flex: none;
350
+ display: inline-flex;
351
+ align-self: center;
352
+ align-items: center;
353
+ gap: 0.22em;
354
+ margin-left: 0.04em;
355
+ color: var(--vscode-descriptionForeground, currentColor);
356
+ font-size: 0.86em;
357
+ font-weight: 600;
358
+ line-height: 1;
359
+ }
360
+
361
+ .md-rich-link-detail[hidden],
362
+ .md-rich-link-changes[hidden],
363
+ .md-rich-link-status[hidden] {
364
+ display: none;
365
+ }
366
+
367
+ .md-rich-link-changes {
368
+ flex: none;
369
+ display: inline-flex;
370
+ align-self: center;
371
+ gap: 0.28em;
372
+ font-size: 0.86em;
373
+ font-weight: 600;
374
+ line-height: 1;
375
+ }
376
+
377
+ .md-rich-link-changes::before,
378
+ .md-rich-link:not(
379
+ [data-md-rich-link-kind='issue'],
380
+ [data-md-rich-link-kind='pullRequest'],
381
+ [data-md-rich-link-kind='session']
382
+ ) .md-rich-link-primary-status::before {
383
+ content: '·';
384
+ color: var(--vscode-descriptionForeground, currentColor);
385
+ font-weight: 400;
386
+ }
387
+
388
+ .md-rich-link-insertions {
389
+ color: var(--vscode-charts-green, #1f883d);
390
+ }
391
+
392
+ .md-rich-link-deletions {
393
+ color: var(--vscode-charts-red, #cf222e);
394
+ }
395
+
396
+ .md-rich-link-status-icon {
397
+ flex: none;
398
+ align-self: center;
399
+ font-size: 1em;
400
+ }
401
+
402
+ .md-rich-link:is(
403
+ [data-md-rich-link-status='open'],
404
+ [data-md-rich-link-status='closed'],
405
+ [data-md-rich-link-status='merged'],
406
+ [data-md-rich-link-status='draft'],
407
+ [data-md-rich-link-status='notPlanned']
408
+ ) .md-rich-link-primary-status {
409
+ color: var(--md-rich-link-state-color);
410
+ }
411
+
412
+ .md-rich-link-secondary-status {
413
+ margin-left: 0.06em;
414
+ }
415
+
416
+ .md-rich-link-secondary-status::before {
417
+ content: '·';
418
+ margin-right: 0.08em;
419
+ color: var(--vscode-descriptionForeground, currentColor);
420
+ font-weight: 400;
421
+ }
422
+
423
+ .md-rich-link:is(
424
+ [data-md-rich-link-status='open'],
425
+ [data-md-rich-link-status='closed'],
426
+ [data-md-rich-link-status='merged'],
427
+ [data-md-rich-link-status='draft'],
428
+ [data-md-rich-link-status='notPlanned']
429
+ ) .md-rich-link-primary-status {
430
+ align-self: baseline;
431
+ padding: 0;
432
+ border: 0;
433
+ border-radius: 0;
434
+ background: transparent;
435
+ font-size: 1em;
436
+ line-height: inherit;
437
+ }
438
+
439
+ .md-rich-link[data-md-rich-link-status='success'] .md-rich-link-primary-status {
440
+ color: var(--vscode-charts-green, #1f883d);
441
+ }
442
+
443
+ .md-rich-link[data-md-rich-link-secondary-status='success'] .md-rich-link-secondary-status {
444
+ color: var(--md-rich-link-success-color);
445
+ }
446
+
447
+ .md-rich-link[data-md-rich-link-status='warning'] .md-rich-link-primary-status,
448
+ .md-rich-link[data-md-rich-link-secondary-status='warning'] .md-rich-link-secondary-status {
449
+ color: var(--vscode-editorWarning-foreground, #bf8700);
450
+ }
451
+
452
+ .md-rich-link[data-md-rich-link-status='error'] .md-rich-link-primary-status,
453
+ .md-rich-link[data-md-rich-link-secondary-status='error'] .md-rich-link-secondary-status {
454
+ color: var(--vscode-errorForeground, #cf222e);
455
+ }
456
+
457
+ .md-rich-link[data-md-rich-link-status='pending'] .md-rich-link-primary-status,
458
+ .md-rich-link[data-md-rich-link-secondary-status='pending'] .md-rich-link-secondary-status {
459
+ color: var(--vscode-editorWarning-foreground, #bf8700);
460
+ }
461
+
462
+ .md-rich-link[data-md-rich-link-kind='issue'] .md-rich-link-primary-status .md-rich-link-status-label,
463
+ .md-rich-link[data-md-rich-link-kind='pullRequest'] :is(
464
+ .md-rich-link-primary-status,
465
+ .md-rich-link-secondary-status
466
+ ) .md-rich-link-status-label {
467
+ display: none;
468
+ }
469
+
470
+ .md-rich-link[data-md-rich-link-status='open'] {
471
+ --md-rich-link-state-color: var(--vscode-charts-green, #1f883d);
472
+ }
473
+
474
+ .md-rich-link[data-md-rich-link-kind='issue'][data-md-rich-link-status='closed'],
475
+ .md-rich-link[data-md-rich-link-status='merged'] {
476
+ --md-rich-link-state-color: var(--vscode-charts-purple, #8250df);
477
+ }
478
+
479
+ .md-rich-link[data-md-rich-link-kind='pullRequest'][data-md-rich-link-status='closed'] {
480
+ --md-rich-link-state-color: var(--vscode-charts-red, #cf222e);
481
+ }
482
+
483
+ .md-rich-link[data-md-rich-link-status='draft'],
484
+ .md-rich-link[data-md-rich-link-status='notPlanned'] {
485
+ --md-rich-link-state-color: var(--vscode-descriptionForeground, #656d76);
486
+ }
487
+
488
+ .md-rich-link[data-md-rich-link-kind='pullRequest'][data-md-rich-link-secondary-status='error'] .md-rich-link-secondary-status {
489
+ color: var(--vscode-charts-red, var(--vscode-errorForeground, #cf222e));
490
+ }
491
+
492
+ .md-rich-link:is(
493
+ [data-md-rich-link-kind='issue'],
494
+ [data-md-rich-link-kind='pullRequest']
495
+ ) {
496
+ align-items: center;
497
+ gap: 4px;
498
+ padding: 1px 6px;
499
+ border-color: var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
500
+ border-radius: 4px;
501
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
502
+ color: var(--vscode-button-secondaryForeground, #242424);
503
+ font-size: 1em;
504
+ line-height: 1.25;
505
+ vertical-align: -0.5px;
506
+ }
507
+
508
+ .md-rich-link:is(
509
+ [data-md-rich-link-kind='issue'],
510
+ [data-md-rich-link-kind='pullRequest']
511
+ ):hover {
512
+ border-color: var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
513
+ background: var(--vscode-button-secondaryHoverBackground, #e5e5e5);
514
+ color: var(--vscode-button-secondaryForeground, #242424);
515
+ }
516
+
517
+ .md-rich-link:is(
518
+ [data-md-rich-link-kind='issue'],
519
+ [data-md-rich-link-kind='pullRequest']
520
+ ) .md-rich-link-reference {
521
+ display: none;
522
+ }
523
+
524
+ .md-rich-link:is(
525
+ [data-md-rich-link-kind='issue'],
526
+ [data-md-rich-link-kind='pullRequest']
527
+ ) :is(
528
+ .md-rich-link-label,
529
+ .md-rich-link-title,
530
+ .md-rich-link-primary-status,
531
+ .md-rich-link-secondary-status
532
+ ) {
533
+ align-self: center;
534
+ font-size: inherit;
535
+ line-height: inherit;
536
+ }
537
+
538
+ .md-rich-link:is(
539
+ [data-md-rich-link-kind='issue'],
540
+ [data-md-rich-link-kind='pullRequest']
541
+ ) :is(.md-rich-link-label, .md-rich-link-title) {
542
+ position: relative;
543
+ top: 0.25px;
544
+ max-width: var(--md-rich-link-title-width, 200px);
545
+ color: inherit;
546
+ font-weight: 400;
547
+ }
548
+
549
+ .md-rich-link:is(
550
+ [data-md-rich-link-kind='issue'],
551
+ [data-md-rich-link-kind='pullRequest']
552
+ ) .md-rich-link-status {
553
+ align-items: center;
554
+ height: 1.25em;
555
+ }
556
+
557
+ .md-rich-link:is(
558
+ [data-md-rich-link-kind='issue'],
559
+ [data-md-rich-link-kind='pullRequest']
560
+ ) .md-rich-link-status-icon {
561
+ display: inline-flex;
562
+ align-items: center;
563
+ justify-content: center;
564
+ width: 12px;
565
+ height: 12px;
566
+ font-size: 12px;
567
+ line-height: 12px;
568
+ }
569
+
570
+ .md-rich-link:is(
571
+ [data-md-rich-link-kind='issue'],
572
+ [data-md-rich-link-kind='pullRequest']
573
+ ) .md-rich-link-secondary-status::before {
574
+ align-self: center;
575
+ line-height: inherit;
576
+ }
577
+
578
+ .md-rich-link[data-md-rich-link-kind='session'] {
579
+ align-items: center;
580
+ gap: 4px;
581
+ padding: 1px 6px;
582
+ border-color: var(--vscode-chat-requestBorder, var(--vscode-input-border, color-mix(in srgb, currentColor 24%, transparent)));
583
+ border-radius: 4px;
584
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
585
+ color: var(--vscode-descriptionForeground, #656d76);
586
+ font-size: 1em;
587
+ font-weight: var(--vscode-agents-fontWeight-regular, 400);
588
+ line-height: 1.25;
589
+ vertical-align: baseline;
590
+ }
591
+
592
+ .md-rich-link[data-md-rich-link-kind='session']:hover {
593
+ border-color: var(--vscode-chat-requestBorder, var(--vscode-input-border, color-mix(in srgb, currentColor 24%, transparent)));
594
+ background: var(--vscode-toolbar-hoverBackground, color-mix(in srgb, currentColor 8%, transparent));
595
+ }
596
+
597
+ .md-rich-link[data-md-rich-link-kind='session'] :is(.md-rich-link-label, .md-rich-link-title) {
598
+ color: inherit;
599
+ font-weight: 400;
600
+ }
601
+
602
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-primary-status {
603
+ align-self: center;
604
+ align-items: center;
605
+ width: 12px;
606
+ height: 12px;
607
+ margin: 0;
608
+ padding: 0;
609
+ border: 0;
610
+ border-radius: 0;
611
+ background: transparent;
612
+ font-size: 1em;
613
+ line-height: inherit;
614
+ }
615
+
616
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-primary-status .md-rich-link-status-label {
617
+ display: none;
618
+ }
619
+
620
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-status-icon:not(.monaco-pixel-spinner, [hidden]) {
621
+ display: inline-flex;
622
+ align-items: center;
623
+ justify-content: center;
624
+ width: 12px;
625
+ height: 12px;
626
+ font-size: 12px;
627
+ line-height: 12px;
628
+ }
629
+
630
+ .md-rich-link .md-rich-link-status-icon[hidden] {
631
+ display: none;
632
+ }
633
+
634
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='neutral'] .md-rich-link-primary-status,
635
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='success'] .md-rich-link-primary-status,
636
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='pending'] .md-rich-link-primary-status {
637
+ color: var(--vscode-descriptionForeground, #656d76);
638
+ }
639
+
640
+ .md-rich-link .monaco-pixel-spinner {
641
+ display: inline-grid;
642
+ grid-template-columns: repeat(2, 2px);
643
+ grid-template-rows: repeat(3, 2px);
644
+ column-gap: 2px;
645
+ row-gap: 2px;
646
+ place-content: center;
647
+ width: 16px;
648
+ height: 16px;
649
+ color: currentColor;
650
+ contain: layout style size paint;
651
+ isolation: isolate;
652
+ pointer-events: none;
653
+ transform: translateZ(0);
654
+ }
655
+
656
+ .md-rich-link[data-md-rich-link-kind='session'] .monaco-pixel-spinner {
657
+ width: 12px;
658
+ height: 12px;
659
+ }
660
+
661
+ .md-rich-link .monaco-pixel-spinner-dot {
662
+ display: block;
663
+ width: 2px;
664
+ height: 2px;
665
+ border-radius: 50%;
666
+ background-color: currentColor;
667
+ opacity: 0;
668
+ transform: translateY(-4px);
669
+ animation: monaco-pixel-spinner-dot-cycle 1820ms steps(6, jump-none) infinite;
670
+ }
671
+
672
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(1) {
673
+ animation-delay: 520ms;
674
+ }
675
+
676
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(2) {
677
+ animation-delay: 650ms;
678
+ }
679
+
680
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(3) {
681
+ animation-delay: 260ms;
682
+ }
683
+
684
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(4) {
685
+ animation-delay: 390ms;
686
+ }
687
+
688
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(5) {
689
+ animation-name: monaco-pixel-spinner-dot-cycle-long;
690
+ }
691
+
692
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(6) {
693
+ animation-name: monaco-pixel-spinner-dot-cycle-short;
694
+ animation-delay: 130ms;
695
+ }
696
+
697
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot {
698
+ opacity: 0.25;
699
+ transform: none;
700
+ animation: monaco-pixel-spinner-ring-pulse 1200ms steps(4, jump-none) infinite;
701
+ }
702
+
703
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(1) {
704
+ animation-delay: 0ms;
705
+ }
706
+
707
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(2) {
708
+ animation-delay: 200ms;
709
+ }
710
+
711
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(3) {
712
+ animation-delay: 1000ms;
713
+ }
714
+
715
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(4) {
716
+ animation-delay: 400ms;
717
+ }
718
+
719
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(5) {
720
+ animation-delay: 800ms;
721
+ }
722
+
723
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(6) {
724
+ animation-delay: 600ms;
725
+ }
726
+
727
+ @keyframes monaco-pixel-spinner-dot-cycle {
728
+ 0% {
729
+ opacity: 0;
730
+ transform: translateY(-4px);
731
+ }
732
+ 9.34%, 57.14% {
733
+ opacity: 1;
734
+ transform: translateY(0);
735
+ }
736
+ 66.48%, 100% {
737
+ opacity: 0;
738
+ transform: translateY(7px);
739
+ }
740
+ }
741
+
742
+ @keyframes monaco-pixel-spinner-dot-cycle-long {
743
+ 0% {
744
+ opacity: 0;
745
+ transform: translateY(-4px);
746
+ }
747
+ 9.34%, 64.29% {
748
+ opacity: 1;
749
+ transform: translateY(0);
750
+ }
751
+ 73.63%, 100% {
752
+ opacity: 0;
753
+ transform: translateY(7px);
754
+ }
755
+ }
756
+
757
+ @keyframes monaco-pixel-spinner-dot-cycle-short {
758
+ 0% {
759
+ opacity: 0;
760
+ transform: translateY(-4px);
761
+ }
762
+ 9.34%, 50% {
763
+ opacity: 1;
764
+ transform: translateY(0);
765
+ }
766
+ 59.34%, 100% {
767
+ opacity: 0;
768
+ transform: translateY(7px);
769
+ }
770
+ }
771
+
772
+ @keyframes monaco-pixel-spinner-ring-pulse {
773
+ 0%, 100% {
774
+ opacity: 0.25;
775
+ transform: none;
776
+ }
777
+ 16.67% {
778
+ opacity: 1;
779
+ transform: none;
780
+ }
781
+ }
782
+
783
+ @media (prefers-reduced-motion: reduce) {
784
+ .md-rich-link .monaco-pixel-spinner-dot {
785
+ animation: none;
786
+ opacity: 1;
787
+ transform: translateY(0);
788
+ }
789
+ }
790
+
791
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='warning'] .md-rich-link-primary-status {
792
+ color: var(--vscode-list-warningForeground, #855f00);
793
+ }
794
+
795
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='warning'] {
796
+ border-color: var(--vscode-list-warningForeground, #855f00);
797
+ background-color: color-mix(in srgb, var(--vscode-list-warningForeground, #855f00) 12%, transparent);
798
+ color: var(--vscode-list-warningForeground, #855f00);
799
+ }
800
+
801
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='error'] .md-rich-link-primary-status {
802
+ color: var(--vscode-errorForeground, #cf222e);
803
+ }
804
+
805
+ .md-rich-link-unavailable {
806
+ border-style: dashed;
807
+ }
808
+
90
809
  .md-fence-spacer {
91
810
  visibility: hidden;
92
811
  font-family: 'Cascadia Code', 'Fira Code', monospace;
@@ -95,8 +814,8 @@
95
814
 
96
815
  .md-marker {
97
816
  color: #999;
98
- font-family: 'Cascadia Code', 'Fira Code', monospace;
99
- font-size: 0.85em;
817
+ font-family: var(--md-marker-font-family);
818
+ font-size: calc(1em * var(--md-marker-font-scale));
100
819
  display: inline;
101
820
  overflow: hidden;
102
821
  max-width: 100px;
@@ -122,6 +841,88 @@
122
841
  white-space: pre-wrap;
123
842
  }
124
843
 
844
+ .md-video-wrapper {
845
+ max-width: 100%;
846
+ }
847
+
848
+ .md-video {
849
+ display: block;
850
+ max-width: 100%;
851
+ max-height: 100%;
852
+ }
853
+
854
+ .md-editor:not(.md-readonly) .md-video:not([controls]) {
855
+ cursor: text;
856
+ }
857
+
858
+ .md-video-source {
859
+ overflow-wrap: anywhere;
860
+ white-space: pre-wrap;
861
+ }
862
+
863
+ /*
864
+ * An unhandled block: a construct the parser does not model (setext heading,
865
+ * an extension token). Its raw source is shown verbatim,
866
+ * styled like a code block but visibly flagged as "not understood" by a dashed
867
+ * warning border, so the content is preserved and editable rather than silently
868
+ * dropped.
869
+ *
870
+ * The wrapper is the non-scrolling box (border + block spacing); the inner
871
+ * `.md-unhandled-scroll` <pre> is the horizontal scroller.
872
+ */
873
+ .md-unhandled-block {
874
+ margin: 0.5em 0;
875
+ border: 1px dashed #d0a000;
876
+ border-radius: 4px;
877
+ }
878
+
879
+ /*
880
+ * Inner scroller. Beats the per-theme `.md-theme-* .md-code-block` box rules
881
+ * (same class count) via the extra `pre` type selector: no margin/border of its
882
+ * own (those live on the wrapper).
883
+ */
884
+ pre.md-unhandled-scroll.md-code-block {
885
+ margin: 0;
886
+ border: 0;
887
+ border-radius: 4px;
888
+ }
889
+
890
+ /*
891
+ * Complete block HTML comments are authoring metadata, not unsupported-syntax
892
+ * warnings. Keep them source-identifiable but quiet while reading, and reveal
893
+ * their exact whitespace when the block becomes active.
894
+ */
895
+ .md-html-comment {
896
+ margin: 0.125em 0 0.25em;
897
+ padding: 0.125em 0;
898
+ overflow: hidden;
899
+ color: var(--md-html-comment-foreground, #6e7378);
900
+ font-family: var(--md-html-comment-font-family, 'Cascadia Code', 'Fira Code', monospace);
901
+ font-size: 0.85em;
902
+ line-height: 1.5;
903
+ text-overflow: ellipsis;
904
+ white-space: nowrap;
905
+ transition: color 80ms ease-out;
906
+ }
907
+
908
+ .md-html-comment:not(.md-html-comment-source):hover {
909
+ color: var(--md-html-comment-hover-foreground, #45494e);
910
+ }
911
+
912
+ .md-html-comment-source {
913
+ overflow: visible;
914
+ text-overflow: clip;
915
+ white-space: pre-wrap;
916
+ }
917
+
918
+ .md-html-comment-syntax {
919
+ opacity: 0.6;
920
+ }
921
+
922
+ .md-html-comment-source .md-html-comment-syntax {
923
+ opacity: 1;
924
+ }
925
+
125
926
  /*
126
927
  * Visible whitespace indicators, shown only in the active/source view. The real
127
928
  * whitespace character stays in the DOM (so source ↔ DOM mapping and selection
@@ -155,7 +956,7 @@
155
956
  left: 0;
156
957
  right: 0;
157
958
  text-align: center;
158
- color: #b0b0b0;
959
+ color: var(--md-whitespace-foreground, #b0b0b0);
159
960
  pointer-events: none;
160
961
  }
161
962
 
@@ -169,7 +970,7 @@
169
970
 
170
971
  .md-ws-newline::before {
171
972
  content: '↵';
172
- color: #b0b0b0;
973
+ color: var(--md-whitespace-foreground, #b0b0b0);
173
974
  pointer-events: none;
174
975
  }
175
976
 
@@ -221,39 +1022,162 @@
221
1022
  }
222
1023
 
223
1024
  /*
224
- * Glue (table cell pipes, the task `[x] ` source, source padding) keeps its
225
- * inline footprint when hidden so column widths and the checkbox gutter stay
226
- * identical between active and inactive states.
1025
+ * A soft ending followed by an explicit blockquote continuation marker renders
1026
+ * a real line break in both views. Its source newline is still mapped and is
1027
+ * revealed while editing, but contributes no hidden width in rendered mode.
1028
+ */
1029
+ .md-blockquote-linebreak-source-hidden {
1030
+ display: none;
1031
+ }
1032
+
1033
+ /*
1034
+ * Structural quote prefixes between child blocks can be owned by a source gap
1035
+ * instead of an inline continuation marker. Keep the exact gap for active
1036
+ * editing, but remove it entirely from inactive layout and hit testing.
1037
+ */
1038
+ .md-glue-blockQuoteSourceGap.md-glue-hidden {
1039
+ display: none;
1040
+ }
1041
+
1042
+ /* A fallback-font newline glyph must not increase the source line's height. */
1043
+ .md-glue-blockQuoteSourceGap > .md-ws-newline-glyph {
1044
+ line-height: 0;
1045
+ }
1046
+
1047
+ /*
1048
+ * Glue normally keeps its inline footprint when hidden so source padding and
1049
+ * widget gutters stay identical between active and inactive states. Hidden
1050
+ * table-cell glue is the exception below: leaving it in inline flow lets its
1051
+ * invisible spaces wrap around long cell content.
227
1052
  */
228
1053
  .md-glue-hidden {
229
1054
  display: inline;
230
1055
  visibility: hidden;
231
1056
  }
232
1057
 
1058
+ /*
1059
+ * Inactive table pipes stay in the DOM/source tree, but leave layout and
1060
+ * hit-testing entirely. Keeping an invisible rect either in the content flow or
1061
+ * over the cell padding can create phantom lines or steal clicks from visible
1062
+ * text. Hidden source offsets therefore collapse to the neighboring semantic
1063
+ * seam, matching other display-none markers. Visible pipes retain the per-theme
1064
+ * active/source layout.
1065
+ */
1066
+ .md-table td>.md-glue-tableCellGlue.md-glue-hidden {
1067
+ display: none;
1068
+ }
1069
+
1070
+ /*
1071
+ * Active table: take each cell's TRAILING structural glue (the source space
1072
+ * after the cell text, and — via the per-theme `right: 0` rule — the last
1073
+ * column's closing `|`) out of the cell's inline flow. Left in flow, that glue
1074
+ * wraps below long cell content (the same wrapping the hidden-glue note above
1075
+ * describes), which makes the cell two lines tall: the browser's default
1076
+ * `vertical-align: middle` then re-centres the other cells' single-line content
1077
+ * in Y, their runs merge into one oversized VisualLine, and the caret — sized
1078
+ * directly from that line box — grows far past the line height while the
1079
+ * visible pipes drift apart row-to-row. Positioning the trailing glue
1080
+ * absolutely removes it from wrapping flow while keeping its real client rects
1081
+ * at the static (content-line) position, so caret placement, hit-testing,
1082
+ * source mapping and injectivity are unchanged. `top`/`bottom: auto` keep it on
1083
+ * that content line rather than the cell's top edge. This mirrors the inactive
1084
+ * `display: none` above; the leading `| ` glue deliberately stays in flow (a
1085
+ * relative glyph shift, per theme) so first-text X is preserved.
1086
+ *
1087
+ * `:not(:first-child)` restricts this to a genuine trailing glue: a non-empty
1088
+ * cell emits leading + trailing glue, but an EMPTY cell parses to a single glue
1089
+ * node that is simultaneously first and last child. That lone node is the
1090
+ * cell's leading pipe, so it must stay in flow like every other leading pipe;
1091
+ * excluding it keeps empty cells identical to their previous (base) behaviour.
1092
+ */
1093
+ .md-table.md-block-active td {
1094
+ position: relative;
1095
+ }
1096
+
1097
+ .md-table.md-block-active td>.md-glue-tableCellGlue:last-child:not(:first-child) {
1098
+ position: absolute;
1099
+ top: auto;
1100
+ bottom: auto;
1101
+ }
1102
+
233
1103
  /*
234
1104
  * Inter-block glue: the run of blank lines between two top-level blocks. It is
235
1105
  * mounted as the last inline child of the block that precedes it, so it sits at
236
1106
  * the end of that block's last line rather than on its own lines between the
237
1107
  * blocks. When a neighbouring block is active it is revealed: each blank-line
238
- * newline shows a real `↵` glyph character (`.md-ws-newline-glyph`) while the
239
- * trailing line-terminator `\n` collapses (`white-space: normal`) so the run
240
- * adds no line break and no height — active and inactive therefore have the
241
- * same height. When hidden it collapses to nothing.
1108
+ * newline shows a real `↵` glyph character (`.md-ws-newline-glyph`) so each
1109
+ * source offset remains distinct. The glyphs stay on the preceding source line
1110
+ * rather than introducing line breaks. When hidden the run collapses to nothing.
242
1111
  */
243
- .md-glue-blockGap {
1112
+ .md-glue-blockGap,
1113
+ .md-glue-blockQuoteSourceGap {
244
1114
  white-space: normal;
245
1115
  }
246
1116
 
247
1117
  /*
248
1118
  * The structural block break between two top-level blocks. Like `.md-glue-blockGap`
249
- * its trailing line-terminator `\n` collapses (`white-space: normal`) so the run
250
- * adds no height; its leading newline is painted as the blue break glyph
1119
+ * its newlines stay inline so the run adds no height; its leading newline is painted as the blue break glyph
251
1120
  * (`.md-ws-blockbreak-glyph`).
252
1121
  */
253
1122
  .md-glue-blockBreak {
254
1123
  white-space: normal;
255
1124
  }
256
1125
 
1126
+ .md-source-editing :is(.md-paragraph, .md-heading, .md-empty-block, td),
1127
+ .md-source-editing :is(.md-text, .md-marker) {
1128
+ white-space: pre-wrap;
1129
+ }
1130
+
1131
+ .md-editor.md-source-editing .md-block,
1132
+ .md-editor.md-source-editing .md-list > li {
1133
+ margin-block: 0;
1134
+ }
1135
+
1136
+ .md-source-editing .md-empty-block {
1137
+ min-height: 1lh;
1138
+ }
1139
+
1140
+ .md-source-editing .md-list > .md-empty-block {
1141
+ list-style: none;
1142
+ counter-increment: list-item 0;
1143
+ margin-inline-start: calc(-1 * var(--md-list-indent-step, 2em));
1144
+ }
1145
+
1146
+ .md-source-editing .md-list > li > .md-empty-block {
1147
+ padding-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1148
+ }
1149
+
1150
+ .md-source-editing .md-glue-emptyLine {
1151
+ white-space: pre-wrap;
1152
+ visibility: visible;
1153
+ }
1154
+
1155
+ .md-source-editing .md-glue-blockTerminator {
1156
+ display: none;
1157
+ }
1158
+
1159
+ .md-source-editing .md-glue-lineSuffix {
1160
+ white-space: pre-wrap;
1161
+ visibility: visible;
1162
+ }
1163
+
1164
+ .md-source-editing .md-ws-newline::before {
1165
+ content: none;
1166
+ }
1167
+
1168
+ .md-source-editing :is(.md-ws-space, .md-ws-tab) {
1169
+ white-space: inherit;
1170
+ }
1171
+
1172
+ /* These source holders already have a <br> supplying their line ending. */
1173
+ .md-source-block :is(.md-hardbreak-src, .md-blockquote-linebreak-source) {
1174
+ white-space: normal;
1175
+ }
1176
+
1177
+ .md-source-block .md-blockquote-linebreak-source .md-ws-newline::before {
1178
+ content: none;
1179
+ }
1180
+
257
1181
  /*
258
1182
  * The task-list checkbox marker (`[x]`/`[ ]`) is special: instead of being
259
1183
  * removed from layout when hidden, it keeps its inline width (visibility
@@ -266,15 +1190,6 @@
266
1190
  visibility: hidden;
267
1191
  }
268
1192
 
269
- /*
270
- * Table cell-glue pipes (`| `) keep their inline footprint when hidden so the
271
- * column widths stay identical active and inactive.
272
- */
273
- .md-marker-tableCellGlue.md-marker-hidden {
274
- display: inline;
275
- visibility: hidden;
276
- }
277
-
278
1193
  /*
279
1194
  * The code-block fences (```lang / ```) each sit on their own source line. When
280
1195
  * hidden they keep their vertical footprint (visibility hidden, not display
@@ -309,6 +1224,69 @@
309
1224
  height: 16px;
310
1225
  }
311
1226
 
1227
+ /*
1228
+ * A wide table scrolls horizontally inside its wrapper (the block box) instead
1229
+ * of overflowing the page and scrolling the editor's fixed left gutter away.
1230
+ * The wrapper is the scroll viewport the selection/caret clipping measures (see
1231
+ * `BlockViewNode.scrollElement` / `blockViewportClip`); the inner `<table>`
1232
+ * keeps `width: auto` (theme-defined) so it sizes to its content and overflows.
1233
+ *
1234
+ * `width: fit-content` keeps the wrapper hugging the table's intrinsic width, so
1235
+ * a narrow table — and the active-block glow redirected onto the wrapper below —
1236
+ * stays as wide as the table (unchanged from before this wrapper existed).
1237
+ * `max-width: 100%` caps it at the content column, past which the table
1238
+ * overflows and scrolls locally. This is the standard responsive-table pattern
1239
+ * (cf. GitHub's own `width: max-content; max-width: 100%`).
1240
+ */
1241
+ .md-table-wrapper {
1242
+ overflow-x: auto;
1243
+ width: fit-content;
1244
+ max-width: 100%;
1245
+ }
1246
+
1247
+ .md-table:has(> .md-glue-blockGap) {
1248
+ position: relative;
1249
+ }
1250
+
1251
+ /* Table trivia must not generate an anonymous row when source is revealed. */
1252
+ .md-table > .md-glue-blockGap {
1253
+ position: absolute;
1254
+ left: 100%;
1255
+ bottom: 0.3em;
1256
+ }
1257
+
1258
+ .md-editor:not(.md-source-editing) .md-paragraph:has(> .md-glue-indent:first-child) {
1259
+ position: relative;
1260
+ }
1261
+
1262
+ .md-editor:not(.md-source-editing) .md-paragraph > .md-glue-indent:first-child {
1263
+ position: absolute;
1264
+ right: 100%;
1265
+ top: 0;
1266
+ }
1267
+
1268
+ /*
1269
+ * The active-block highlight is an *outset* glow (`box-shadow: 0 0 0 8px`).
1270
+ * Making the wrapper a scroll box (`overflow-x: auto`, which also forces
1271
+ * `overflow-y: auto`) clips descendant paint to its padding box, so the glow on
1272
+ * the inner active `<table>` would be cut off (the table has no horizontal
1273
+ * margin to give the shadow room). Render the generic active chrome on the
1274
+ * wrapper instead — a scroll box's own shadow is never clipped by its own
1275
+ * overflow, exactly like a code block carries the glow on its own scroller —
1276
+ * and drop it from the table, which keeps `md-block-active` purely for the
1277
+ * per-theme source-pipe styling.
1278
+ */
1279
+ :where(.md-editor:not(.md-no-active-block-highlight)) .md-table-wrapper:has(> .md-table.md-block-active) {
1280
+ background: var(--md-block-active-background, #f8f8f8);
1281
+ border-radius: 4px;
1282
+ box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
1283
+ }
1284
+
1285
+ .md-table.md-block-active {
1286
+ background: none;
1287
+ box-shadow: none;
1288
+ }
1289
+
312
1290
  .md-selection-layer {
313
1291
  position: absolute;
314
1292
  top: 0;
@@ -374,6 +1352,7 @@
374
1352
  /* Source markers occupy the gutter so toggling them never shifts content. */
375
1353
  .md-heading {
376
1354
  position: relative;
1355
+ min-height: 1lh;
377
1356
  }
378
1357
 
379
1358
  .md-heading>.md-marker:first-child {
@@ -390,7 +1369,7 @@
390
1369
  display: inline-flex;
391
1370
  align-items: center;
392
1371
  justify-content: flex-end;
393
- transform: scale(0.85);
1372
+ transform: scale(var(--md-heading-marker-scale, 0.85));
394
1373
  transform-origin: right center;
395
1374
  }
396
1375
 
@@ -403,6 +1382,18 @@
403
1382
  display: none;
404
1383
  }
405
1384
 
1385
+ /* Nested heading prefixes must not overlap their enclosing quote/list gutter. */
1386
+ .md-source-editing :is(.md-blockquote, .md-list) .md-heading > .md-marker:first-child {
1387
+ position: static;
1388
+ display: inline;
1389
+ font-size: calc(1em * var(--md-marker-font-scale));
1390
+ transform: none;
1391
+ }
1392
+
1393
+ .md-source-editing :is(.md-blockquote, .md-list) .md-heading > .md-marker-hidden:first-child {
1394
+ display: none;
1395
+ }
1396
+
406
1397
  /*
407
1398
  * Block-quote prefixes (`> `, one per quoted source line) are real
408
1399
  * `blockQuoteMarker` markers, siblings of the quote's child blocks. Each hangs
@@ -422,21 +1413,146 @@
422
1413
  position: relative;
423
1414
  }
424
1415
 
425
- .md-blockquote>.md-marker-blockQuoteMarker {
1416
+ .md-blockquote>.md-marker-blockQuoteMarker,
1417
+ .md-source-editing li > .md-glue-blockQuotePrefix {
426
1418
  position: absolute;
427
- right: calc(100% - var(--md-blockquote-pad, 0px));
1419
+ right: calc(100% - var(--md-blockquote-pad, 0px) - 1ch);
428
1420
  top: auto;
1421
+ /*
1422
+ * Reserve the optional-space column so adding it cannot move the `>` glyph,
1423
+ * then shift and scale every active quote marker consistently to leave a
1424
+ * virtual gap before body text without consuming source width. These tuned
1425
+ * properties are shared by ordinary and marker-only quote lines.
1426
+ */
1427
+ --md-blockquote-marker-shift: -0.18ch;
1428
+ --md-blockquote-marker-scale: 0.9;
1429
+ display: inline-flex;
1430
+ min-width: 2ch;
1431
+ font-size: inherit;
1432
+ line-height: inherit;
1433
+ height: 1lh;
1434
+ align-items: center;
1435
+ text-align: left;
429
1436
  white-space: pre;
1437
+ transform: translateX(var(--md-blockquote-marker-shift)) scale(var(--md-blockquote-marker-scale));
1438
+ transform-origin: left center;
1439
+ }
1440
+
1441
+ .md-source-editing li > .md-glue-blockQuotePrefix {
1442
+ right: calc(100% + var(--md-list-indent-step, 2em) - 1ch);
1443
+ }
1444
+
1445
+ /* Inactive: gone entirely (the gutter is empty, the text stays put). */
1446
+ .md-blockquote>.md-marker-blockQuoteMarker.md-marker-hidden {
1447
+ display: none;
1448
+ }
1449
+
1450
+ /* Collapsed block-gap newlines still need one flow box per marker-only line. */
1451
+ .md-blockquote-line-anchor {
1452
+ display: block;
1453
+ }
1454
+
1455
+ /* A trailing marker-only source line follows the preceding quoted line directly. */
1456
+ .md-blockquote-marker-only-line>.md-paragraph:last-of-type {
1457
+ margin-bottom: 0;
1458
+ }
1459
+
1460
+ /* Code/math blocks scroll horizontally; their look is theme-defined. */
1461
+ .md-code-block {
1462
+ overflow-x: auto;
1463
+ }
1464
+
1465
+ .md-block.md-code-block.md-embedded-code-editor {
1466
+ background: transparent;
1467
+ padding: 0;
1468
+ }
1469
+
1470
+ /* Keep actions out of the horizontal scroller and sticky within a long block. */
1471
+ .md-code-block-container {
1472
+ display: flow-root;
1473
+ position: relative;
1474
+ min-width: 0;
1475
+ }
1476
+
1477
+ .md-code-block-container > .md-code-block {
1478
+ box-sizing: border-box;
1479
+ min-height: 36px;
1480
+ }
1481
+
1482
+ .md-code-block-actions {
1483
+ position: sticky;
1484
+ top: 0;
1485
+ z-index: 2;
1486
+ display: flex;
1487
+ align-items: center;
1488
+ justify-content: flex-end;
1489
+ gap: 6px;
1490
+ box-sizing: border-box;
1491
+ height: 32px;
1492
+ margin-bottom: -32px;
1493
+ padding: 4px 4px 0;
1494
+ opacity: 0;
1495
+ pointer-events: none;
1496
+ user-select: none;
1497
+ }
1498
+
1499
+ .md-code-block-container:hover>.md-code-block-actions,
1500
+ .md-code-block-container:hover>.md-embedded-code-editor>.md-code-block-actions,
1501
+ .md-code-block-actions:focus-within,
1502
+ .md-code-block-actions.md-code-block-copy-feedback {
1503
+ opacity: 1;
1504
+ }
1505
+
1506
+ .md-code-block-copy {
1507
+ display: inline-flex;
1508
+ align-items: center;
1509
+ justify-content: center;
1510
+ flex: none;
1511
+ width: 28px;
1512
+ height: 28px;
1513
+ padding: 4px;
1514
+ border: 1px solid var(--md-readonly-border, #b8b8b8);
1515
+ border-radius: 4px;
1516
+ background: var(--md-readonly-background, #f3f3f3);
1517
+ color: var(--md-readonly-foreground, #444444);
1518
+ cursor: pointer;
1519
+ pointer-events: auto;
1520
+ }
1521
+
1522
+ .md-code-block-copy:hover {
1523
+ background: var(--md-readonly-background-hover, #e9e9e9);
1524
+ }
1525
+
1526
+ .md-code-block-copy:focus-visible {
1527
+ outline: 2px solid var(--md-readonly-accent, #4c8bf5);
1528
+ outline-offset: 1px;
1529
+ }
1530
+
1531
+ .md-code-block-copy-status:not(:empty) {
1532
+ padding: 2px 6px;
1533
+ border-radius: 4px;
1534
+ background: var(--md-readonly-background, #f3f3f3);
1535
+ color: var(--md-readonly-foreground, #444444);
1536
+ font: 12px/1.4 sans-serif;
1537
+ }
1538
+
1539
+ @media (hover: none) {
1540
+ .md-code-block-actions {
1541
+ opacity: 1;
1542
+ }
430
1543
  }
431
1544
 
432
- /* Inactive: gone entirely (the gutter is empty, the text stays put). */
433
- .md-blockquote>.md-marker-blockQuoteMarker.md-marker-hidden {
434
- display: none;
435
- }
1545
+ @media (forced-colors: active) {
1546
+ .md-code-block-copy,
1547
+ .md-code-block-copy-status:not(:empty) {
1548
+ background: ButtonFace;
1549
+ color: ButtonText;
1550
+ border-color: ButtonText;
1551
+ }
436
1552
 
437
- /* Code/math blocks scroll horizontally; their look is theme-defined. */
438
- .md-code-block {
439
- overflow-x: auto;
1553
+ .md-code-block-copy:focus-visible {
1554
+ outline-color: Highlight;
1555
+ }
440
1556
  }
441
1557
 
442
1558
  .md-math-block {
@@ -447,7 +1563,8 @@
447
1563
  margin: 0;
448
1564
  }
449
1565
 
450
- .md-list li>.md-block {
1566
+ .md-list li>.md-block,
1567
+ .md-list li>.md-code-block-container>.md-code-block {
451
1568
  margin: 0;
452
1569
  }
453
1570
 
@@ -460,25 +1577,97 @@
460
1577
  position: relative;
461
1578
  }
462
1579
 
1580
+ .md-list > li {
1581
+ min-height: 1lh;
1582
+ position: relative;
1583
+ }
1584
+
463
1585
  /*
464
1586
  * The list marker is pulled into the gutter by markerKind (not `:first-child`),
465
1587
  * because a nested item may carry its source indentation as a leading glue
466
1588
  * before the marker. Gutter-positioning keeps the marker out of the inline
467
1589
  * flow so toggling it never shifts the item's text horizontally.
468
1590
  *
469
- * `line-height: inherit` makes the marker share the item's line box (its own
470
- * `.md-marker` rule shrinks it to `line-height: 1`, which floats the glyph to
471
- * the top of the taller text line); matching the line box vertically centres
472
- * the `-` with the rendered text.
1591
+ * The source box follows the first body line; the native reading marker is
1592
+ * never replaced or resized. Source symbols share the body's font baseline,
1593
+ * not a font-dependent optical centre of the painted asterisk.
473
1594
  */
474
1595
  .md-list-item-active>.md-marker-listItemMarker {
475
1596
  position: absolute;
476
1597
  right: 100%;
477
1598
  top: 0;
1599
+ }
1600
+
1601
+ .md-list-item-active>.md-marker-listItemMarker,
1602
+ .md-list-item-active>.md-list-gutter>.md-marker-listItemMarker,
1603
+ .md-source-editing .md-list-gutter > .md-marker-listItemMarker {
478
1604
  line-height: inherit;
1605
+ height: calc(1lh / var(--md-marker-font-scale));
1606
+ display: inline-flex;
1607
+ align-items: center;
1608
+ justify-content: flex-end;
1609
+ white-space: pre;
1610
+ }
1611
+
1612
+ /*
1613
+ * `display: inline-flex` above outranks the plain `.md-marker-hidden`
1614
+ * (`display: none`), so — exactly as for headings — re-hide the marker here for
1615
+ * the states that ask for it, otherwise the bullet could never be hidden.
1616
+ */
1617
+ .md-list-item-active>.md-marker-listItemMarker.md-marker-hidden,
1618
+ .md-list-item-active>.md-list-gutter>.md-marker-listItemMarker.md-marker-hidden {
1619
+ display: none;
1620
+ }
1621
+
1622
+ /* An unfinished marker still uses the gutter of its completed "marker + space" prefix. */
1623
+ .md-list-item-incomplete > .md-marker-listItemMarker::after,
1624
+ .md-list-item-incomplete > .md-list-gutter > .md-marker-listItemMarker::after {
1625
+ content: ' ';
479
1626
  white-space: pre;
480
1627
  }
481
1628
 
1629
+ .md-list-item-incomplete .md-marker-listItemMarker > .md-list-item-line-anchor {
1630
+ font-size: calc(1em / var(--md-marker-font-scale));
1631
+ }
1632
+
1633
+ .md-marker-listItemMarker:has(> .md-list-marker-symbol) {
1634
+ font-family: inherit;
1635
+ --md-marker-font-scale: 1;
1636
+ }
1637
+
1638
+ .md-list-marker-symbol {
1639
+ display: inline-block;
1640
+ flex: 0 0 1em;
1641
+ width: 1em;
1642
+ text-align: center;
1643
+ }
1644
+
1645
+ .md-marker-listItemMarker:has(> .md-list-marker-symbol) > :is(.md-ws-space, .md-ws-tab),
1646
+ .md-source-editing .md-list-continuation-separator {
1647
+ font-family: var(--md-marker-font-family);
1648
+ word-spacing: calc(0.5em - 1ch + var(--md-list-marker-reserve) / var(--md-list-marker-spaces));
1649
+ tab-size: calc(0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces));
1650
+ }
1651
+
1652
+ .md-list-item-incomplete > .md-marker-listItemMarker:has(> .md-list-marker-symbol)::after,
1653
+ .md-list-item-incomplete > .md-list-gutter > .md-marker-listItemMarker:has(> .md-list-marker-symbol)::after {
1654
+ width: 0.5em;
1655
+ }
1656
+
1657
+ /*
1658
+ * An inactive ordered item uses the browser's native `::marker`. Match its
1659
+ * typography when revealing the source marker so switching the active item
1660
+ * does not change the number's width or horizontal position: an ordered marker
1661
+ * opts out of the muted size step entirely, which also makes the `1lh`
1662
+ * compensation above a no-op for it.
1663
+ */
1664
+ ol.md-list>.md-list-item-active>.md-marker-listItemMarker,
1665
+ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker,
1666
+ .md-source-editing ol.md-list > li > .md-list-gutter > .md-marker-listItemMarker {
1667
+ font-family: inherit;
1668
+ --md-marker-font-scale: 1;
1669
+ }
1670
+
482
1671
  /*
483
1672
  * A nested item's source indentation precedes its bullet (`␣␣- text`). The
484
1673
  * indent glue and the bullet are mounted together in this gutter span, which is
@@ -507,8 +1696,66 @@
507
1696
  justify-content: space-between;
508
1697
  }
509
1698
 
1699
+ .md-source-editing .md-list-gutter {
1700
+ top: 0;
1701
+ height: 1lh;
1702
+ align-items: center;
1703
+ }
1704
+
1705
+ .md-source-editing .md-list-gutter > .md-glue-indent,
1706
+ .md-source-editing .md-list-continuation-indent {
1707
+ --md-source-indent-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em));
1708
+ --md-source-space-width: calc(var(--md-source-indent-width) / var(--md-indent-length));
1709
+ flex-basis: var(--md-source-indent-width);
1710
+ display: block;
1711
+ font-family: var(--md-marker-font-family);
1712
+ /* Stretch the source character itself so DOM ranges and selections fill the cell too. */
1713
+ word-spacing: calc(var(--md-source-space-width) - 1ch);
1714
+ tab-size: var(--md-source-space-width);
1715
+ }
1716
+
1717
+ .md-source-editing .md-task-list-item > .md-list-gutter > .md-glue-indent {
1718
+ --md-source-indent-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em) / 2);
1719
+ }
1720
+
1721
+ .md-source-editing .md-list-continuation-prefix {
1722
+ font-family: var(--md-marker-font-family);
1723
+ white-space: pre;
1724
+ }
1725
+
1726
+ .md-source-editing .md-list-continuation-prefix > span {
1727
+ display: inline;
1728
+ }
1729
+
1730
+ .md-source-editing .md-list-continuation-symbol {
1731
+ word-spacing: calc(1em - 1ch);
1732
+ }
1733
+
1734
+ .md-source-editing .md-list-continuation-outside {
1735
+ margin-inline-start: calc((var(--md-list-level) - var(--md-list-source-indent)) * var(--md-list-indent-step, 2em) - 1.5em - var(--md-list-marker-reserve));
1736
+ }
1737
+
1738
+ .md-source-editing .md-list-gutter > .md-marker-listItemMarker.md-marker-hidden {
1739
+ display: inline-flex;
1740
+ visibility: hidden;
1741
+ }
1742
+
510
1743
  .md-list-gutter>.md-marker-listItemMarker {
511
1744
  flex: 0 0 auto;
1745
+ white-space: pre;
1746
+ }
1747
+
1748
+ /*
1749
+ * A nested item's gutter stays one body line tall. The marker has the same
1750
+ * compensated line box as a top-level marker, including when it hosts the
1751
+ * incomplete item's zero-source caret anchor.
1752
+ *
1753
+ * The gutter and source symbol carry body typography, so their baselines stay
1754
+ * aligned without measuring fonts or changing native reading markers.
1755
+ */
1756
+ .md-list-item-active>.md-list-gutter {
1757
+ height: 1lh;
1758
+ align-items: center;
512
1759
  }
513
1760
 
514
1761
 
@@ -523,6 +1770,20 @@
523
1770
  white-space: pre;
524
1771
  }
525
1772
 
1773
+ /*
1774
+ * A continuation-line indent inside a paragraph is source-only padding. When
1775
+ * inactive, the preceding soft-break newline already collapses to the single
1776
+ * rendered space Markdown requires; retaining the hidden indent would add the
1777
+ * tab/space run's width on top of it.
1778
+ */
1779
+ .md-paragraph>.md-glue-indent.md-glue-hidden {
1780
+ display: none;
1781
+ }
1782
+
1783
+ .md-source-editing .md-paragraph>.md-glue-indent.md-glue-hidden {
1784
+ display: inline;
1785
+ }
1786
+
526
1787
  /*
527
1788
  * A loose list item's later block (its second paragraph etc.) owns the source
528
1789
  * continuation indent that precedes it as its `leadingTrivia`. Like a nested
@@ -532,12 +1793,14 @@
532
1793
  * active (the footprint is identical in both states, so the text never shifts).
533
1794
  */
534
1795
  .md-list li>.md-block,
535
- .md-task-list-item>.md-block {
1796
+ .md-task-list-item>.md-block,
1797
+ .md-list li>.md-code-block-container>.md-code-block {
536
1798
  position: relative;
537
1799
  }
538
1800
 
539
1801
  .md-list li>.md-block>.md-glue-indent:first-child,
540
- .md-task-list-item>.md-block>.md-glue-indent:first-child {
1802
+ .md-task-list-item>.md-block>.md-glue-indent:first-child,
1803
+ .md-list li>.md-code-block-container>.md-code-block>.md-glue-indent:first-child {
541
1804
  position: absolute;
542
1805
  right: 100%;
543
1806
  top: 0;
@@ -546,34 +1809,148 @@
546
1809
  .md-task-list-item {
547
1810
  list-style: none;
548
1811
  position: relative;
549
- /*
550
- * Width of the checkbox / `[x]` source column. Single-sourced so the marker
551
- * reservation on the first paragraph and the left indent of any following
552
- * block (loose task items) stay in lockstep — keeping every block's text in
553
- * one vertical column under the marker.
554
- */
555
- --md-task-marker-width: 1.75em;
556
1812
  }
557
1813
 
558
- /*
559
- * Reserve the marker column after the `[x]`/`[ ]` source marker (the first glue
560
- * in a task item's paragraph) so the rendered checkbox widget overlaid on it has
561
- * a comfortable gap before the text. The fixed width applies in both active and
562
- * inactive states, so the first text character does not drift horizontally when
563
- * markers toggle (see the compare fixture's `checkMarkedTextX` assertion).
564
- */
565
- .md-task-list-item .md-paragraph>.md-glue:first-child {
1814
+ .md-list > li {
1815
+ --md-list-label-reserve: 0em;
1816
+ --md-list-marker-reserve: var(--md-list-label-reserve);
1817
+ --md-list-source-padding: 0em;
1818
+ }
1819
+
1820
+ .md-list > .md-list-item-active {
1821
+ --md-list-source-padding: calc((var(--md-list-marker-spaces) - 1) * 0.5em);
1822
+ }
1823
+
1824
+ .md-list > .md-task-list-item {
1825
+ --md-list-marker-reserve: 0em;
1826
+ }
1827
+
1828
+ .md-list-with-task-items > li:not(.md-empty-block) {
1829
+ --md-list-label-reserve: 0.5em;
1830
+ }
1831
+
1832
+ .md-editor .md-list > li > .md-paragraph {
1833
+ padding-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1834
+ }
1835
+
1836
+ .md-editor .md-list > li > .md-list-item-line-anchor {
1837
+ margin-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1838
+ }
1839
+
1840
+ .md-editor .md-list > li > .md-marker-listItemMarker {
1841
+ right: calc(100% - (var(--md-list-label-reserve) + var(--md-list-source-padding)) / var(--md-marker-font-scale));
1842
+ }
1843
+
1844
+ .md-editor .md-list-gutter {
1845
+ right: calc(100% - var(--md-list-label-reserve) - var(--md-list-source-padding));
1846
+ }
1847
+
1848
+ .md-source-editing .md-marker-listItemMarker {
1849
+ word-spacing: calc(var(--md-list-marker-reserve) / var(--md-marker-font-scale) / var(--md-list-marker-spaces));
1850
+ }
1851
+
1852
+ /* Keep the mandatory separator's native width; each extra source space adds a body-sized half-em cell. */
1853
+ .md-source-editing .md-marker-listItemMarker > :is(.md-ws-space, .md-ws-tab) ~ :is(.md-ws-space, .md-ws-tab) {
1854
+ font-family: var(--md-marker-font-family);
1855
+ word-spacing: calc((0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces)) / var(--md-marker-font-scale) - 1ch);
1856
+ tab-size: calc((0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces)) / var(--md-marker-font-scale));
1857
+ }
1858
+
1859
+ .md-task-separator {
1860
+ position: absolute;
1861
+ left: calc(var(--md-list-source-padding) - 1em + 1.5ch * var(--md-marker-font-scale));
1862
+ top: 0;
1863
+ font-family: var(--md-marker-font-family);
1864
+ white-space: pre;
1865
+ word-spacing: calc((1.5em - 1.5ch * var(--md-marker-font-scale)) / var(--md-separator-length) - 1ch);
1866
+ tab-size: calc((1.5em - 1.5ch * var(--md-marker-font-scale)) / var(--md-separator-length));
1867
+ }
1868
+
1869
+ .md-task-list-item>.md-paragraph>.md-glue-taskListCheck {
1870
+ position: absolute;
1871
+ top: 0;
1872
+ font-family: var(--md-marker-font-family);
1873
+ font-size: calc(1em * var(--md-marker-font-scale));
1874
+ left: calc((var(--md-list-source-padding) - 1em) / var(--md-marker-font-scale) - 1.5ch);
1875
+ width: 3ch;
1876
+ }
1877
+
1878
+ .md-source-editing .md-task-list-item > .md-paragraph > .md-glue-taskListCheck {
1879
+ position: static;
566
1880
  display: inline-block;
567
- width: var(--md-task-marker-width);
1881
+ margin-inline-start: calc((-1em - var(--md-list-label-reserve)) / var(--md-marker-font-scale) - 1.5ch);
568
1882
  }
569
1883
 
570
- /*
571
- * Following blocks in a loose task item (the second paragraph etc.) carry no
572
- * marker glue, so indent them by the marker column to line their text up under
573
- * the first paragraph's text rather than under the checkbox.
574
- */
575
- .md-task-list-item>.md-block+.md-block {
576
- padding-left: var(--md-task-marker-width);
1884
+ .md-source-editing .md-task-separator {
1885
+ position: static;
1886
+ }
1887
+
1888
+ .md-source-editing .md-list-continuation-source {
1889
+ display: none;
1890
+ white-space: pre;
1891
+ }
1892
+
1893
+ .md-source-editing .md-block-active .md-list-continuation-source {
1894
+ display: inline;
1895
+ }
1896
+
1897
+ .md-source-editing .md-list-continuation-source.md-list-continuation-leading {
1898
+ display: inline;
1899
+ position: absolute;
1900
+ right: calc(100% - var(--md-list-label-reserve) - var(--md-list-source-padding));
1901
+ top: auto;
1902
+ }
1903
+
1904
+ .md-source-editing .md-list .md-code-block-container:has(> .md-code-list-source) {
1905
+ display: block;
1906
+ --md-list-prefix-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em) + 1em + var(--md-list-marker-spaces) * 0.5em + var(--md-list-label-reserve));
1907
+ margin-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding) - var(--md-list-prefix-width));
1908
+ }
1909
+
1910
+ .md-source-editing .md-list .md-code-list-source {
1911
+ position: relative;
1912
+ font-size: inherit;
1913
+ border-inline-start-width: 0;
1914
+ padding-inline-start: var(--md-list-prefix-width);
1915
+ }
1916
+
1917
+ .md-source-editing .md-list li > .md-code-block-container > .md-code-list-source > .md-list-continuation-prefix:first-child {
1918
+ right: calc(100% - var(--md-list-prefix-width));
1919
+ top: auto;
1920
+ }
1921
+
1922
+ .md-code-source-line {
1923
+ position: relative;
1924
+ }
1925
+
1926
+ .md-code-source-line > .md-list-continuation-prefix {
1927
+ position: absolute;
1928
+ right: 100%;
1929
+ }
1930
+
1931
+ .md-editor .md-task-list-item > .md-list-gutter {
1932
+ right: calc(100% - var(--md-list-source-padding));
1933
+ }
1934
+
1935
+ .md-task-list-item > .md-list-gutter::after {
1936
+ content: '';
1937
+ font-family: var(--md-marker-font-family);
1938
+ font-size: calc(1em * var(--md-marker-font-scale));
1939
+ flex: 0 0 calc(1em / var(--md-marker-font-scale) + 1.5ch);
1940
+ }
1941
+
1942
+ .md-task-list-item > .md-block + .md-block:not(.md-list) {
1943
+ padding-left: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1944
+ }
1945
+
1946
+ .md-task-list-item > .md-list {
1947
+ padding-left: var(--md-list-indent-step, 2em);
1948
+ }
1949
+
1950
+ .md-task-list-item > .md-checkbox {
1951
+ font: inherit;
1952
+ left: calc(var(--md-list-source-padding) - 1em - 8px);
1953
+ top: calc((1lh - 16px) / 2);
577
1954
  }
578
1955
 
579
1956
  .md-checkbox {
@@ -588,6 +1965,7 @@
588
1965
  position: absolute;
589
1966
  left: 0;
590
1967
  top: 0.25em;
1968
+ z-index: 1;
591
1969
  cursor: pointer;
592
1970
  transition: background-color 0.15s ease, border-color 0.15s ease;
593
1971
  }
@@ -600,8 +1978,8 @@
600
1978
  .md-checkbox:checked::after {
601
1979
  content: '';
602
1980
  position: absolute;
603
- left: 3px;
604
- top: 0px;
1981
+ left: 2.5px;
1982
+ top: -1px;
605
1983
  width: 5px;
606
1984
  height: 9px;
607
1985
  border: solid white;
@@ -613,6 +1991,39 @@
613
1991
  border-color: #888;
614
1992
  }
615
1993
 
1994
+ /*
1995
+ * The rotating "broken rounded-square" progress ring for an inactive task item
1996
+ * whose text begins with the hidden `:running:` marker (see
1997
+ * `ListItemViewData.isRunning`). Rendered as a conic-gradient ring — masked so
1998
+ * only the ring (not its center) paints — with a transparent gap that spins,
1999
+ * reading as a segmented spinner rather than a checked/unchecked box.
2000
+ */
2001
+ .md-checkbox-running,
2002
+ .md-checkbox-running:checked {
2003
+ padding: 2px;
2004
+ border: 0;
2005
+ border-radius: 4px;
2006
+ background: conic-gradient(
2007
+ transparent 0deg 42deg,
2008
+ #bbb 62deg 360deg
2009
+ );
2010
+ -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
2011
+ -webkit-mask-composite: xor;
2012
+ mask-composite: exclude;
2013
+ animation: md-checkbox-spin 0.8s linear infinite;
2014
+ opacity: 1;
2015
+ }
2016
+
2017
+ @keyframes md-checkbox-spin {
2018
+ to {
2019
+ transform: rotate(360deg);
2020
+ }
2021
+ }
2022
+
2023
+ .md-checkbox-running:hover {
2024
+ border-color: transparent;
2025
+ }
2026
+
616
2027
  .md-checkbox:checked:hover {
617
2028
  background-color: #3a73d4;
618
2029
  border-color: #3a73d4;
@@ -623,14 +2034,66 @@
623
2034
  opacity: 0.6;
624
2035
  }
625
2036
 
2037
+ .md-checkbox-running:disabled {
2038
+ opacity: 1;
2039
+ }
2040
+
2041
+ @media (prefers-reduced-motion: reduce) {
2042
+ .md-checkbox-running {
2043
+ animation: none !important;
2044
+ }
2045
+ }
2046
+
2047
+ /*
2048
+ * The `:running:` marker hidden from an inactive task item's rendered text
2049
+ * (see `TextViewData.hiddenPrefixLength`). It stays real, selectable source —
2050
+ * only visually hidden, per "Hidden markers remain real source" — so it takes
2051
+ * no layout space in either state.
2052
+ */
2053
+ .md-runner-marker {
2054
+ display: none;
2055
+ }
2056
+
626
2057
  .md-cursor {
627
2058
  position: absolute;
628
2059
  width: 2px;
629
2060
  background: var(--md-cursor-background, #000);
630
2061
  pointer-events: none;
2062
+ }
2063
+
2064
+ /*
2065
+ * The painted caret is only shown while the editor is genuinely focused — focus
2066
+ * rests inside it and its window is focused, mirrored onto the root as
2067
+ * `.md-focused`. When unfocused, hide the caret element but keep its layout box
2068
+ * (so caret geometry, selection and comment anchoring are unchanged) and stop
2069
+ * the blink. Adding the animation on focus restarts it from 0% (a solid caret).
2070
+ */
2071
+ .md-editor:not(.md-focused) .md-cursor {
2072
+ visibility: hidden;
2073
+ }
2074
+
2075
+ .md-editor.md-focused .md-cursor {
631
2076
  animation: md-cursor-blink 1s step-end infinite;
632
2077
  }
633
2078
 
2079
+ /*
2080
+ * Read-only mode retains the logical caret for selection and comment anchoring.
2081
+ * Hide only its painted element so unlocking can restore it in place.
2082
+ */
2083
+ .md-editor.md-readonly .md-cursor {
2084
+ visibility: hidden;
2085
+ }
2086
+
2087
+ .md-editor.md-readonly-editing-attempt {
2088
+ animation: md-readonly-editing-attempt 300ms ease-out;
2089
+ }
2090
+
2091
+ @keyframes md-readonly-editing-attempt {
2092
+ 50% {
2093
+ box-shadow: inset 0 0 0 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
2094
+ }
2095
+ }
2096
+
634
2097
  @keyframes md-cursor-blink {
635
2098
 
636
2099
  0%,
@@ -646,15 +2109,15 @@
646
2109
  /*
647
2110
  * Edit / read-only lock toggle.
648
2111
  *
649
- * The host is a zero-height sticky strip pinned to the top of the scroll
650
- * viewport, so the lock stays in the top-right corner as the document scrolls.
651
- * Being height-0 it never participates in the document's vertical flow. Colors
652
- * use local `--md-readonly-*` custom properties with literal fallbacks so this
653
- * base file stays theme-agnostic (themes may override them).
2112
+ * The sticky overlay never changes text flow or the symmetric content margins.
2113
+ * Narrow margins let the control overlap content rather than reserving a rail.
2114
+ * Colors use local `--md-readonly-*` custom
2115
+ * properties with literal fallbacks so this base file stays theme-agnostic
2116
+ * (themes may override them).
654
2117
  */
655
2118
  .md-readonly-toggle-host {
656
2119
  position: sticky;
657
- top: 0;
2120
+ top: var(--md-readonly-toggle-inset);
658
2121
  height: 0;
659
2122
  z-index: 10;
660
2123
  pointer-events: none;
@@ -662,28 +2125,78 @@
662
2125
 
663
2126
  .md-readonly-toggle {
664
2127
  position: absolute;
665
- top: 8px;
666
- right: 8px;
2128
+ top: 4px;
2129
+ right: var(--md-readonly-toggle-inset);
667
2130
  pointer-events: auto;
668
- display: inline-flex;
2131
+ display: inline-grid;
2132
+ grid-template-columns: repeat(3, 24px);
669
2133
  align-items: center;
670
- gap: 5px;
671
- height: 26px;
672
- padding: 0 10px;
673
- border-radius: 13px;
674
- border: 1px solid var(--md-readonly-border, #d4d4d4);
675
- background: var(--md-readonly-background, #ffffff);
676
- color: var(--md-readonly-foreground, #444);
677
- font: 600 11px/1 system-ui, -apple-system, 'Segoe UI', sans-serif;
678
- letter-spacing: 0.02em;
2134
+ justify-items: center;
2135
+ gap: 2px;
2136
+ box-sizing: border-box;
2137
+ width: var(--md-readonly-toggle-width);
2138
+ height: var(--md-readonly-toggle-height);
2139
+ padding: 3px;
2140
+ overflow: hidden;
2141
+ direction: ltr;
2142
+ appearance: none;
2143
+ border-radius: 999px;
2144
+ border: 1px solid var(--md-readonly-border, #b8b8b8);
2145
+ background: var(--md-readonly-background, #f3f3f3);
2146
+ color: var(--md-readonly-foreground, #444444);
2147
+ font-size: 16px;
2148
+ line-height: 1;
679
2149
  cursor: pointer;
680
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
681
- transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
2150
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
2151
+ transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
2152
+ }
2153
+
2154
+ .md-readonly-toggle::after {
2155
+ content: '';
2156
+ position: absolute;
2157
+ z-index: 2;
2158
+ top: -8px;
2159
+ bottom: -8px;
2160
+ left: -30px;
2161
+ width: 24px;
2162
+ background: linear-gradient(90deg,
2163
+ transparent,
2164
+ var(--md-readonly-shine-edge, rgba(255, 255, 255, 0.16)) 24%,
2165
+ var(--md-readonly-shine, #ffffff) 50%,
2166
+ var(--md-readonly-shine-edge, rgba(255, 255, 255, 0.16)) 76%,
2167
+ transparent);
2168
+ box-shadow: 0 0 8px 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
2169
+ opacity: 0;
2170
+ pointer-events: none;
2171
+ transform: skewX(-20deg);
2172
+ }
2173
+
2174
+ .md-readonly-toggle.md-readonly-toggle-shine::after {
2175
+ animation: md-readonly-toggle-shine 2s linear;
2176
+ will-change: transform, opacity;
2177
+ }
2178
+
2179
+ @keyframes md-readonly-toggle-shine {
2180
+ 0% {
2181
+ opacity: 0;
2182
+ transform: translateX(0) skewX(-20deg);
2183
+ }
2184
+
2185
+ 12%,
2186
+ 88% {
2187
+ opacity: 1;
2188
+ }
2189
+
2190
+ 100% {
2191
+ opacity: 0;
2192
+ transform: translateX(122px) skewX(-20deg);
2193
+ }
682
2194
  }
683
2195
 
684
2196
  .md-readonly-toggle:hover {
685
- border-color: var(--md-readonly-border-hover, #b8b8b8);
686
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
2197
+ border-color: var(--md-readonly-border-hover, #8d8d8d);
2198
+ background: var(--md-readonly-background-hover, #e9e9e9);
2199
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.1);
687
2200
  }
688
2201
 
689
2202
  .md-readonly-toggle:focus-visible {
@@ -691,36 +2204,89 @@
691
2204
  outline-offset: 1px;
692
2205
  }
693
2206
 
694
- .md-readonly-toggle .md-readonly-toggle-icon {
695
- display: inline-flex;
696
- align-items: center;
2207
+ .md-readonly-toggle .md-readonly-toggle-indicator {
2208
+ position: absolute;
2209
+ top: 50%;
2210
+ left: 3px;
2211
+ width: 24px;
2212
+ height: 24px;
2213
+ border-radius: 50%;
2214
+ background: var(--md-readonly-accent, #4c8bf5);
2215
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
2216
+ transform: translate(26px, -50%);
2217
+ transition: background-color 0.12s ease, transform 0.16s ease;
697
2218
  }
698
2219
 
699
- .md-readonly-toggle .md-readonly-toggle-label {
700
- white-space: nowrap;
2220
+ .md-readonly-toggle .md-readonly-toggle-icon {
2221
+ position: relative;
2222
+ z-index: 1;
2223
+ display: block;
2224
+ width: 16px;
2225
+ height: 16px;
2226
+ color: var(--md-readonly-foreground, #444444);
2227
+ opacity: 0.62;
2228
+ pointer-events: none;
2229
+ transition: color 0.12s ease, opacity 0.12s ease;
701
2230
  }
702
2231
 
703
- /* Show the open padlock while editing, the closed one while locked. */
704
- .md-readonly-toggle .md-readonly-toggle-icon-locked {
705
- display: none;
2232
+ .md-readonly-toggle:not(.md-readonly-toggle-locked) .md-readonly-toggle-icon-editing,
2233
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
2234
+ color: var(--md-readonly-accent-foreground, #ffffff);
2235
+ opacity: 1;
706
2236
  }
707
2237
 
708
- .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-unlocked {
709
- display: none;
2238
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-indicator {
2239
+ transform: translate(0, -50%);
710
2240
  }
711
2241
 
712
- .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
713
- display: inline-flex;
714
- }
2242
+ @media (prefers-reduced-motion: reduce) {
715
2243
 
716
- /* Locked (read-only) state: filled accent so the engaged lock reads clearly. */
717
- .md-readonly-toggle.md-readonly-toggle-locked {
718
- border-color: var(--md-readonly-accent, #4c8bf5);
719
- background: var(--md-readonly-accent, #4c8bf5);
720
- color: var(--md-readonly-accent-foreground, #ffffff);
2244
+ .md-editor.md-readonly-editing-attempt,
2245
+ .md-readonly-toggle,
2246
+ .md-readonly-toggle .md-readonly-toggle-indicator,
2247
+ .md-readonly-toggle .md-readonly-toggle-icon,
2248
+ .md-readonly-toggle.md-readonly-toggle-shine::after {
2249
+ animation: none;
2250
+ transition: none;
2251
+ }
721
2252
  }
722
2253
 
723
- .md-readonly-toggle.md-readonly-toggle-locked:hover {
724
- border-color: var(--md-readonly-accent-hover, #3a73d4);
725
- background: var(--md-readonly-accent-hover, #3a73d4);
2254
+ @media (forced-colors: active) {
2255
+ .md-readonly-toggle {
2256
+ forced-color-adjust: none;
2257
+ border-color: ButtonText;
2258
+ background: ButtonFace;
2259
+ color: ButtonText;
2260
+ box-shadow: none;
2261
+ }
2262
+
2263
+ .md-readonly-toggle::after {
2264
+ display: none;
2265
+ }
2266
+
2267
+ .md-readonly-toggle:hover {
2268
+ border-color: Highlight;
2269
+ background: ButtonFace;
2270
+ box-shadow: none;
2271
+ }
2272
+
2273
+ .md-readonly-toggle:focus-visible {
2274
+ outline-color: Highlight;
2275
+ }
2276
+
2277
+ .md-readonly-toggle .md-readonly-toggle-indicator {
2278
+ background: Highlight;
2279
+ box-shadow: none;
2280
+ }
2281
+
2282
+ .md-readonly-toggle .md-readonly-toggle-icon {
2283
+ color: ButtonText;
2284
+ opacity: 1;
2285
+ }
2286
+
2287
+ .md-readonly-toggle:not(.md-readonly-toggle-locked):not(.md-readonly-toggle-source) .md-readonly-toggle-icon-editing,
2288
+ .md-readonly-toggle.md-readonly-toggle-source .md-readonly-toggle-icon-source,
2289
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
2290
+ color: HighlightText;
2291
+ }
726
2292
  }