@vscode/markdown-editor 0.0.2-12 → 0.0.2-121

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 (77) hide show
  1. package/README.md +571 -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 +1964 -155
  11. package/dist/index.js +8134 -2188
  12. package/dist/index.js.map +1 -1
  13. package/dist/markdown-editor.css +1 -0
  14. package/dist/stringEdit-CVDbCUBY.js +215 -0
  15. package/dist/stringEdit-CVDbCUBY.js.map +1 -0
  16. package/dist/web-editors.d.ts +301 -0
  17. package/dist/web-editors.js +7368 -0
  18. package/dist/web-editors.js.map +1 -0
  19. package/package.json +66 -17
  20. package/src/contrib/comments/commentInput.css +89 -0
  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 +1608 -66
  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 +407 -0
  29. package/src/view/themes/{vscode.css → vscode-github.css} +134 -62
  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
@@ -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
  *
@@ -17,16 +20,35 @@
17
20
  * theme-agnostic and know nothing about VS Code. Where a value needs to vary
18
21
  * per theme, expose a local `--md-*` custom property WITH a sensible literal
19
22
  * fallback (e.g. `var(--md-cursor-background, #000)`) and let a theme file set
20
- * it. Only `themes/vscode.css` is permitted to read `--vscode-*` variables and
21
- * map them onto these `--md-*` properties.
23
+ * it. Only the `themes/vscode-*.css` themes are permitted to read `--vscode-*`
24
+ * variables and map them onto these `--md-*` properties.
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-editor-a11y-status {
41
+ position: absolute;
42
+ width: 1px;
43
+ height: 1px;
44
+ padding: 0;
45
+ margin: -1px;
46
+ overflow: hidden;
47
+ clip: rect(0, 0, 0, 0);
48
+ white-space: nowrap;
49
+ border: 0;
50
+ }
51
+
30
52
  /*
31
53
  * The transient empty paragraph — the blank line conjured by pressing Enter at
32
54
  * the end of a paragraph (see `PendingParagraph` in the model). It is not part
@@ -42,20 +64,66 @@
42
64
  * overlays, which position themselves relative to this box, so it is the
43
65
  * positioning context. In limited-width mode the editor sets an inline
44
66
  * `max-width` here and the auto inline margins center it within the full-width
45
- * `.md-editor`.
67
+ * `.md-editor`. The block-start padding keeps every document clear of the top
68
+ * edge, independent of the first block's theme margins.
46
69
  */
47
70
  .md-editor-content {
71
+ --md-editor-min-inline-padding: 8px;
72
+ --md-editor-content-inline-start-padding: var(--md-editor-min-inline-padding);
73
+ --md-editor-content-inline-end-padding: var(--md-editor-content-inline-start-padding);
48
74
  position: relative;
75
+ display: flow-root;
49
76
  margin-inline: auto;
50
- padding: 48px;
77
+ padding-block: 32px 0;
78
+ padding-inline: var(--md-editor-content-inline-start-padding) var(--md-editor-content-inline-end-padding);
79
+ }
80
+
81
+ .md-editor-medium-margins > .md-editor-content {
82
+ --md-editor-content-inline-start-padding: max(var(--md-editor-min-inline-padding), 48px);
83
+ }
84
+
85
+ .md-editor-content:has(> .md-document > .md-heading) {
86
+ --md-editor-min-inline-padding: 2em;
87
+ }
88
+
89
+ .md-editor-content>.md-document :is(.md-heading, .md-paragraph) {
90
+ overflow-wrap: anywhere;
91
+ }
92
+
93
+ .md-editor .md-document > :first-child,
94
+ .md-editor .md-blockquote > :nth-child(1 of .md-block) {
95
+ margin-block-start: 0;
51
96
  }
52
97
 
53
- .md-block-active {
98
+ :where(.md-editor:not(.md-no-active-block-highlight)) .md-block-active {
54
99
  background: var(--md-block-active-background, #f8f8f8);
55
100
  border-radius: 4px;
56
101
  box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
57
102
  }
58
103
 
104
+ /*
105
+ * The whole-empty-document case. Markdown has no empty-paragraph node, so a
106
+ * document with no content parses to a single empty paragraph (see
107
+ * `_ensureBlocks` in the parser) which renders as a childless `<p>` of zero
108
+ * height. Give it one line's height so the editor presents an intentional,
109
+ * clickable empty editing surface — and so typing the first character causes no
110
+ * layout shift (a filled line is also one `lh` tall).
111
+ */
112
+ .md-paragraph:empty {
113
+ min-height: 1lh;
114
+ }
115
+
116
+ /*
117
+ * ...and never paint the active-block card over that zero-content line: with no
118
+ * text to size it, the card's background + 8px box-shadow glow would show up as
119
+ * a stray gray bar. The two extra classes outrank the base `.md-block-active`
120
+ * rule above in every theme (themes only remap `--md-block-active-background`).
121
+ */
122
+ .md-paragraph:empty.md-block-active {
123
+ background: transparent;
124
+ box-shadow: none;
125
+ }
126
+
59
127
  /*
60
128
  * Cursor mirrors the same open affordance as the underline below: the anchor's
61
129
  * pointer cursor appears exactly when a click would open the link. An inactive
@@ -87,6 +155,560 @@
87
155
  text-decoration: none;
88
156
  }
89
157
 
158
+ .md-rich-link {
159
+ display: inline-flex;
160
+ align-items: baseline;
161
+ max-width: min(100%, var(--md-rich-link-line-width, 52rem));
162
+ box-sizing: border-box;
163
+ gap: 0.24em;
164
+ padding: 1px 0.3em;
165
+ border: 1px solid color-mix(in srgb, var(--vscode-textLink-foreground, #0969da) 24%, transparent);
166
+ border-radius: 0.3em;
167
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
168
+ color: inherit;
169
+ font-size: 1em;
170
+ line-height: 1.25;
171
+ text-decoration: none;
172
+ vertical-align: baseline;
173
+ white-space: nowrap;
174
+ cursor: pointer;
175
+ --md-rich-link-success-color: var(--vscode-charts-green, #1f883d);
176
+ }
177
+
178
+ .md-rich-link:hover {
179
+ border-color: var(--vscode-focusBorder, color-mix(in srgb, currentColor 42%, transparent));
180
+ background: var(--vscode-button-secondaryHoverBackground, #e5e5e5);
181
+ text-decoration: none;
182
+ }
183
+
184
+ .md-rich-link:focus-visible {
185
+ outline: 1px solid var(--vscode-focusBorder, currentColor);
186
+ outline-offset: 1px;
187
+ }
188
+
189
+ .md-rich-link-icon {
190
+ flex: none;
191
+ align-self: center;
192
+ font-size: 0.92em;
193
+ color: color-mix(in srgb, var(--vscode-textLink-foreground, #0969da) 78%, currentColor);
194
+ }
195
+
196
+ .md-rich-link-label,
197
+ .md-rich-link-title,
198
+ .md-rich-link-detail {
199
+ overflow: hidden;
200
+ text-overflow: ellipsis;
201
+ }
202
+
203
+ .md-rich-link-label,
204
+ .md-rich-link-title {
205
+ flex: 0 1 auto;
206
+ min-width: 0;
207
+ color: var(--vscode-textLink-foreground, currentColor);
208
+ font-weight: 600;
209
+ }
210
+
211
+ .md-rich-link-title {
212
+ max-width: var(--md-rich-link-title-width, 200px);
213
+ }
214
+
215
+ .md-rich-link-label {
216
+ max-width: var(--md-rich-link-title-width, none);
217
+ }
218
+
219
+ .md-rich-link[data-md-rich-link-kind='session'] :is(.md-rich-link-label, .md-rich-link-title) {
220
+ max-width: var(--md-rich-link-title-width, 150px);
221
+ }
222
+
223
+ .md-rich-link-line-end {
224
+ --md-rich-link-title-width: none;
225
+ }
226
+
227
+ .md-rich-link-label[hidden],
228
+ .md-rich-link-title[hidden],
229
+ .md-rich-link-reference[hidden] {
230
+ display: none;
231
+ }
232
+
233
+ .md-rich-link-reference {
234
+ flex: none;
235
+ color: var(--vscode-descriptionForeground, color-mix(in srgb, currentColor 72%, transparent));
236
+ font-size: 0.92em;
237
+ }
238
+
239
+ .md-rich-link-detail {
240
+ flex: 1 1 auto;
241
+ min-width: 1.5em;
242
+ color: var(--vscode-descriptionForeground, color-mix(in srgb, currentColor 72%, transparent));
243
+ font-size: 0.92em;
244
+ }
245
+
246
+ .md-rich-link-detail::before {
247
+ content: '·';
248
+ margin-right: 0.28em;
249
+ }
250
+
251
+ .md-rich-link-status {
252
+ flex: none;
253
+ display: inline-flex;
254
+ align-self: center;
255
+ align-items: center;
256
+ gap: 0.22em;
257
+ margin-left: 0.04em;
258
+ color: var(--vscode-descriptionForeground, currentColor);
259
+ font-size: 0.86em;
260
+ font-weight: 600;
261
+ line-height: 1;
262
+ }
263
+
264
+ .md-rich-link-detail[hidden],
265
+ .md-rich-link-changes[hidden],
266
+ .md-rich-link-status[hidden] {
267
+ display: none;
268
+ }
269
+
270
+ .md-rich-link-changes {
271
+ flex: none;
272
+ display: inline-flex;
273
+ align-self: center;
274
+ gap: 0.28em;
275
+ font-size: 0.86em;
276
+ font-weight: 600;
277
+ line-height: 1;
278
+ }
279
+
280
+ .md-rich-link-changes::before,
281
+ .md-rich-link:not(
282
+ [data-md-rich-link-kind='issue'],
283
+ [data-md-rich-link-kind='pullRequest'],
284
+ [data-md-rich-link-kind='session']
285
+ ) .md-rich-link-primary-status::before {
286
+ content: '·';
287
+ color: var(--vscode-descriptionForeground, currentColor);
288
+ font-weight: 400;
289
+ }
290
+
291
+ .md-rich-link-insertions {
292
+ color: var(--vscode-charts-green, #1f883d);
293
+ }
294
+
295
+ .md-rich-link-deletions {
296
+ color: var(--vscode-charts-red, #cf222e);
297
+ }
298
+
299
+ .md-rich-link-status-icon {
300
+ flex: none;
301
+ align-self: center;
302
+ font-size: 1em;
303
+ }
304
+
305
+ .md-rich-link:is(
306
+ [data-md-rich-link-status='open'],
307
+ [data-md-rich-link-status='closed'],
308
+ [data-md-rich-link-status='merged'],
309
+ [data-md-rich-link-status='draft'],
310
+ [data-md-rich-link-status='notPlanned']
311
+ ) .md-rich-link-primary-status {
312
+ color: var(--md-rich-link-state-color);
313
+ }
314
+
315
+ .md-rich-link-secondary-status {
316
+ margin-left: 0.06em;
317
+ }
318
+
319
+ .md-rich-link-secondary-status::before {
320
+ content: '·';
321
+ margin-right: 0.08em;
322
+ color: var(--vscode-descriptionForeground, currentColor);
323
+ font-weight: 400;
324
+ }
325
+
326
+ .md-rich-link:is(
327
+ [data-md-rich-link-status='open'],
328
+ [data-md-rich-link-status='closed'],
329
+ [data-md-rich-link-status='merged'],
330
+ [data-md-rich-link-status='draft'],
331
+ [data-md-rich-link-status='notPlanned']
332
+ ) .md-rich-link-primary-status {
333
+ align-self: baseline;
334
+ padding: 0;
335
+ border: 0;
336
+ border-radius: 0;
337
+ background: transparent;
338
+ font-size: 1em;
339
+ line-height: inherit;
340
+ }
341
+
342
+ .md-rich-link[data-md-rich-link-status='success'] .md-rich-link-primary-status {
343
+ color: var(--vscode-charts-green, #1f883d);
344
+ }
345
+
346
+ .md-rich-link[data-md-rich-link-secondary-status='success'] .md-rich-link-secondary-status {
347
+ color: var(--md-rich-link-success-color);
348
+ }
349
+
350
+ .md-rich-link[data-md-rich-link-status='warning'] .md-rich-link-primary-status,
351
+ .md-rich-link[data-md-rich-link-secondary-status='warning'] .md-rich-link-secondary-status {
352
+ color: var(--vscode-editorWarning-foreground, #bf8700);
353
+ }
354
+
355
+ .md-rich-link[data-md-rich-link-status='error'] .md-rich-link-primary-status,
356
+ .md-rich-link[data-md-rich-link-secondary-status='error'] .md-rich-link-secondary-status {
357
+ color: var(--vscode-errorForeground, #cf222e);
358
+ }
359
+
360
+ .md-rich-link[data-md-rich-link-status='pending'] .md-rich-link-primary-status,
361
+ .md-rich-link[data-md-rich-link-secondary-status='pending'] .md-rich-link-secondary-status {
362
+ color: var(--vscode-editorWarning-foreground, #bf8700);
363
+ }
364
+
365
+ .md-rich-link[data-md-rich-link-kind='issue'] .md-rich-link-primary-status .md-rich-link-status-label,
366
+ .md-rich-link[data-md-rich-link-kind='pullRequest'] :is(
367
+ .md-rich-link-primary-status,
368
+ .md-rich-link-secondary-status
369
+ ) .md-rich-link-status-label {
370
+ display: none;
371
+ }
372
+
373
+ .md-rich-link[data-md-rich-link-status='open'] {
374
+ --md-rich-link-state-color: var(--vscode-charts-green, #1f883d);
375
+ }
376
+
377
+ .md-rich-link[data-md-rich-link-kind='issue'][data-md-rich-link-status='closed'],
378
+ .md-rich-link[data-md-rich-link-status='merged'] {
379
+ --md-rich-link-state-color: var(--vscode-charts-purple, #8250df);
380
+ }
381
+
382
+ .md-rich-link[data-md-rich-link-kind='pullRequest'][data-md-rich-link-status='closed'] {
383
+ --md-rich-link-state-color: var(--vscode-charts-red, #cf222e);
384
+ }
385
+
386
+ .md-rich-link[data-md-rich-link-status='draft'],
387
+ .md-rich-link[data-md-rich-link-status='notPlanned'] {
388
+ --md-rich-link-state-color: var(--vscode-descriptionForeground, #656d76);
389
+ }
390
+
391
+ .md-rich-link[data-md-rich-link-kind='pullRequest'][data-md-rich-link-secondary-status='error'] .md-rich-link-secondary-status {
392
+ color: var(--vscode-charts-red, var(--vscode-errorForeground, #cf222e));
393
+ }
394
+
395
+ .md-rich-link:is(
396
+ [data-md-rich-link-kind='issue'],
397
+ [data-md-rich-link-kind='pullRequest']
398
+ ) {
399
+ align-items: center;
400
+ gap: 4px;
401
+ padding: 1px 6px;
402
+ border-color: var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
403
+ border-radius: 4px;
404
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
405
+ color: var(--vscode-button-secondaryForeground, #242424);
406
+ font-size: 1em;
407
+ line-height: 1.25;
408
+ vertical-align: -0.5px;
409
+ }
410
+
411
+ .md-rich-link:is(
412
+ [data-md-rich-link-kind='issue'],
413
+ [data-md-rich-link-kind='pullRequest']
414
+ ):hover {
415
+ border-color: var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
416
+ background: var(--vscode-button-secondaryHoverBackground, #e5e5e5);
417
+ color: var(--vscode-button-secondaryForeground, #242424);
418
+ }
419
+
420
+ .md-rich-link:is(
421
+ [data-md-rich-link-kind='issue'],
422
+ [data-md-rich-link-kind='pullRequest']
423
+ ) .md-rich-link-reference {
424
+ display: none;
425
+ }
426
+
427
+ .md-rich-link:is(
428
+ [data-md-rich-link-kind='issue'],
429
+ [data-md-rich-link-kind='pullRequest']
430
+ ) :is(
431
+ .md-rich-link-label,
432
+ .md-rich-link-title,
433
+ .md-rich-link-primary-status,
434
+ .md-rich-link-secondary-status
435
+ ) {
436
+ align-self: center;
437
+ font-size: inherit;
438
+ line-height: inherit;
439
+ }
440
+
441
+ .md-rich-link:is(
442
+ [data-md-rich-link-kind='issue'],
443
+ [data-md-rich-link-kind='pullRequest']
444
+ ) :is(.md-rich-link-label, .md-rich-link-title) {
445
+ position: relative;
446
+ top: 0.25px;
447
+ max-width: var(--md-rich-link-title-width, 200px);
448
+ color: inherit;
449
+ font-weight: 400;
450
+ }
451
+
452
+ .md-rich-link:is(
453
+ [data-md-rich-link-kind='issue'],
454
+ [data-md-rich-link-kind='pullRequest']
455
+ ) .md-rich-link-status {
456
+ align-items: center;
457
+ height: 1.25em;
458
+ }
459
+
460
+ .md-rich-link:is(
461
+ [data-md-rich-link-kind='issue'],
462
+ [data-md-rich-link-kind='pullRequest']
463
+ ) .md-rich-link-status-icon {
464
+ display: inline-flex;
465
+ align-items: center;
466
+ justify-content: center;
467
+ width: 12px;
468
+ height: 12px;
469
+ font-size: 12px;
470
+ line-height: 12px;
471
+ }
472
+
473
+ .md-rich-link:is(
474
+ [data-md-rich-link-kind='issue'],
475
+ [data-md-rich-link-kind='pullRequest']
476
+ ) .md-rich-link-secondary-status::before {
477
+ align-self: center;
478
+ line-height: inherit;
479
+ }
480
+
481
+ .md-rich-link[data-md-rich-link-kind='session'] {
482
+ align-items: center;
483
+ gap: 4px;
484
+ padding: 1px 6px;
485
+ border-color: var(--vscode-chat-requestBorder, var(--vscode-input-border, color-mix(in srgb, currentColor 24%, transparent)));
486
+ border-radius: 4px;
487
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
488
+ color: var(--vscode-descriptionForeground, #656d76);
489
+ font-size: 1em;
490
+ font-weight: var(--vscode-agents-fontWeight-regular, 400);
491
+ line-height: 1.25;
492
+ vertical-align: baseline;
493
+ }
494
+
495
+ .md-rich-link[data-md-rich-link-kind='session']:hover {
496
+ border-color: var(--vscode-chat-requestBorder, var(--vscode-input-border, color-mix(in srgb, currentColor 24%, transparent)));
497
+ background: var(--vscode-toolbar-hoverBackground, color-mix(in srgb, currentColor 8%, transparent));
498
+ }
499
+
500
+ .md-rich-link[data-md-rich-link-kind='session'] :is(.md-rich-link-label, .md-rich-link-title) {
501
+ color: inherit;
502
+ font-weight: 400;
503
+ }
504
+
505
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-primary-status {
506
+ align-self: center;
507
+ align-items: center;
508
+ width: 12px;
509
+ height: 12px;
510
+ margin: 0;
511
+ padding: 0;
512
+ border: 0;
513
+ border-radius: 0;
514
+ background: transparent;
515
+ font-size: 1em;
516
+ line-height: inherit;
517
+ }
518
+
519
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-primary-status .md-rich-link-status-label {
520
+ display: none;
521
+ }
522
+
523
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-status-icon:not(.monaco-pixel-spinner, [hidden]) {
524
+ display: inline-flex;
525
+ align-items: center;
526
+ justify-content: center;
527
+ width: 12px;
528
+ height: 12px;
529
+ font-size: 12px;
530
+ line-height: 12px;
531
+ }
532
+
533
+ .md-rich-link .md-rich-link-status-icon[hidden] {
534
+ display: none;
535
+ }
536
+
537
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='neutral'] .md-rich-link-primary-status,
538
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='success'] .md-rich-link-primary-status,
539
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='pending'] .md-rich-link-primary-status {
540
+ color: var(--vscode-descriptionForeground, #656d76);
541
+ }
542
+
543
+ .md-rich-link .monaco-pixel-spinner {
544
+ display: inline-grid;
545
+ grid-template-columns: repeat(2, 2px);
546
+ grid-template-rows: repeat(3, 2px);
547
+ column-gap: 2px;
548
+ row-gap: 2px;
549
+ place-content: center;
550
+ width: 16px;
551
+ height: 16px;
552
+ color: currentColor;
553
+ contain: layout style size paint;
554
+ isolation: isolate;
555
+ pointer-events: none;
556
+ transform: translateZ(0);
557
+ }
558
+
559
+ .md-rich-link[data-md-rich-link-kind='session'] .monaco-pixel-spinner {
560
+ width: 12px;
561
+ height: 12px;
562
+ }
563
+
564
+ .md-rich-link .monaco-pixel-spinner-dot {
565
+ display: block;
566
+ width: 2px;
567
+ height: 2px;
568
+ border-radius: 50%;
569
+ background-color: currentColor;
570
+ opacity: 0;
571
+ transform: translateY(-4px);
572
+ animation: monaco-pixel-spinner-dot-cycle 1820ms steps(6, jump-none) infinite;
573
+ }
574
+
575
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(1) {
576
+ animation-delay: 520ms;
577
+ }
578
+
579
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(2) {
580
+ animation-delay: 650ms;
581
+ }
582
+
583
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(3) {
584
+ animation-delay: 260ms;
585
+ }
586
+
587
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(4) {
588
+ animation-delay: 390ms;
589
+ }
590
+
591
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(5) {
592
+ animation-name: monaco-pixel-spinner-dot-cycle-long;
593
+ }
594
+
595
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(6) {
596
+ animation-name: monaco-pixel-spinner-dot-cycle-short;
597
+ animation-delay: 130ms;
598
+ }
599
+
600
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot {
601
+ opacity: 0.25;
602
+ transform: none;
603
+ animation: monaco-pixel-spinner-ring-pulse 1200ms steps(4, jump-none) infinite;
604
+ }
605
+
606
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(1) {
607
+ animation-delay: 0ms;
608
+ }
609
+
610
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(2) {
611
+ animation-delay: 200ms;
612
+ }
613
+
614
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(3) {
615
+ animation-delay: 1000ms;
616
+ }
617
+
618
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(4) {
619
+ animation-delay: 400ms;
620
+ }
621
+
622
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(5) {
623
+ animation-delay: 800ms;
624
+ }
625
+
626
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(6) {
627
+ animation-delay: 600ms;
628
+ }
629
+
630
+ @keyframes monaco-pixel-spinner-dot-cycle {
631
+ 0% {
632
+ opacity: 0;
633
+ transform: translateY(-4px);
634
+ }
635
+ 9.34%, 57.14% {
636
+ opacity: 1;
637
+ transform: translateY(0);
638
+ }
639
+ 66.48%, 100% {
640
+ opacity: 0;
641
+ transform: translateY(7px);
642
+ }
643
+ }
644
+
645
+ @keyframes monaco-pixel-spinner-dot-cycle-long {
646
+ 0% {
647
+ opacity: 0;
648
+ transform: translateY(-4px);
649
+ }
650
+ 9.34%, 64.29% {
651
+ opacity: 1;
652
+ transform: translateY(0);
653
+ }
654
+ 73.63%, 100% {
655
+ opacity: 0;
656
+ transform: translateY(7px);
657
+ }
658
+ }
659
+
660
+ @keyframes monaco-pixel-spinner-dot-cycle-short {
661
+ 0% {
662
+ opacity: 0;
663
+ transform: translateY(-4px);
664
+ }
665
+ 9.34%, 50% {
666
+ opacity: 1;
667
+ transform: translateY(0);
668
+ }
669
+ 59.34%, 100% {
670
+ opacity: 0;
671
+ transform: translateY(7px);
672
+ }
673
+ }
674
+
675
+ @keyframes monaco-pixel-spinner-ring-pulse {
676
+ 0%, 100% {
677
+ opacity: 0.25;
678
+ transform: none;
679
+ }
680
+ 16.67% {
681
+ opacity: 1;
682
+ transform: none;
683
+ }
684
+ }
685
+
686
+ @media (prefers-reduced-motion: reduce) {
687
+ .md-rich-link .monaco-pixel-spinner-dot {
688
+ animation: none;
689
+ opacity: 1;
690
+ transform: translateY(0);
691
+ }
692
+ }
693
+
694
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='warning'] .md-rich-link-primary-status {
695
+ color: var(--vscode-list-warningForeground, #855f00);
696
+ }
697
+
698
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='warning'] {
699
+ border-color: var(--vscode-list-warningForeground, #855f00);
700
+ background-color: color-mix(in srgb, var(--vscode-list-warningForeground, #855f00) 12%, transparent);
701
+ color: var(--vscode-list-warningForeground, #855f00);
702
+ }
703
+
704
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='error'] .md-rich-link-primary-status {
705
+ color: var(--vscode-errorForeground, #cf222e);
706
+ }
707
+
708
+ .md-rich-link-unavailable {
709
+ border-style: dashed;
710
+ }
711
+
90
712
  .md-fence-spacer {
91
713
  visibility: hidden;
92
714
  font-family: 'Cascadia Code', 'Fira Code', monospace;
@@ -95,8 +717,8 @@
95
717
 
96
718
  .md-marker {
97
719
  color: #999;
98
- font-family: 'Cascadia Code', 'Fira Code', monospace;
99
- font-size: 0.85em;
720
+ font-family: var(--md-marker-font-family);
721
+ font-size: calc(1em * var(--md-marker-font-scale));
100
722
  display: inline;
101
723
  overflow: hidden;
102
724
  max-width: 100px;
@@ -122,6 +744,88 @@
122
744
  white-space: pre-wrap;
123
745
  }
124
746
 
747
+ .md-video-wrapper {
748
+ max-width: 100%;
749
+ }
750
+
751
+ .md-video {
752
+ display: block;
753
+ max-width: 100%;
754
+ max-height: 100%;
755
+ }
756
+
757
+ .md-editor:not(.md-readonly) .md-video:not([controls]) {
758
+ cursor: text;
759
+ }
760
+
761
+ .md-video-source {
762
+ overflow-wrap: anywhere;
763
+ white-space: pre-wrap;
764
+ }
765
+
766
+ /*
767
+ * An unhandled block: a construct the parser does not model (setext heading,
768
+ * an extension token). Its raw source is shown verbatim,
769
+ * styled like a code block but visibly flagged as "not understood" by a dashed
770
+ * warning border, so the content is preserved and editable rather than silently
771
+ * dropped.
772
+ *
773
+ * The wrapper is the non-scrolling box (border + block spacing); the inner
774
+ * `.md-unhandled-scroll` <pre> is the horizontal scroller.
775
+ */
776
+ .md-unhandled-block {
777
+ margin: 0.5em 0;
778
+ border: 1px dashed #d0a000;
779
+ border-radius: 4px;
780
+ }
781
+
782
+ /*
783
+ * Inner scroller. Beats the per-theme `.md-theme-* .md-code-block` box rules
784
+ * (same class count) via the extra `pre` type selector: no margin/border of its
785
+ * own (those live on the wrapper).
786
+ */
787
+ pre.md-unhandled-scroll.md-code-block {
788
+ margin: 0;
789
+ border: 0;
790
+ border-radius: 4px;
791
+ }
792
+
793
+ /*
794
+ * Complete block HTML comments are authoring metadata, not unsupported-syntax
795
+ * warnings. Keep them source-identifiable but quiet while reading, and reveal
796
+ * their exact whitespace when the block becomes active.
797
+ */
798
+ .md-html-comment {
799
+ margin: 0.125em 0 0.25em;
800
+ padding: 0.125em 0;
801
+ overflow: hidden;
802
+ color: var(--md-html-comment-foreground, #6e7378);
803
+ font-family: var(--md-html-comment-font-family, 'Cascadia Code', 'Fira Code', monospace);
804
+ font-size: 0.85em;
805
+ line-height: 1.5;
806
+ text-overflow: ellipsis;
807
+ white-space: nowrap;
808
+ transition: color 80ms ease-out;
809
+ }
810
+
811
+ .md-html-comment:not(.md-html-comment-source):hover {
812
+ color: var(--md-html-comment-hover-foreground, #45494e);
813
+ }
814
+
815
+ .md-html-comment-source {
816
+ overflow: visible;
817
+ text-overflow: clip;
818
+ white-space: pre-wrap;
819
+ }
820
+
821
+ .md-html-comment-syntax {
822
+ opacity: 0.6;
823
+ }
824
+
825
+ .md-html-comment-source .md-html-comment-syntax {
826
+ opacity: 1;
827
+ }
828
+
125
829
  /*
126
830
  * Visible whitespace indicators, shown only in the active/source view. The real
127
831
  * whitespace character stays in the DOM (so source ↔ DOM mapping and selection
@@ -155,7 +859,7 @@
155
859
  left: 0;
156
860
  right: 0;
157
861
  text-align: center;
158
- color: #b0b0b0;
862
+ color: var(--md-whitespace-foreground, #b0b0b0);
159
863
  pointer-events: none;
160
864
  }
161
865
 
@@ -169,7 +873,7 @@
169
873
 
170
874
  .md-ws-newline::before {
171
875
  content: '↵';
172
- color: #b0b0b0;
876
+ color: var(--md-whitespace-foreground, #b0b0b0);
173
877
  pointer-events: none;
174
878
  }
175
879
 
@@ -221,39 +925,162 @@
221
925
  }
222
926
 
223
927
  /*
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.
928
+ * A soft ending followed by an explicit blockquote continuation marker renders
929
+ * a real line break in both views. Its source newline is still mapped and is
930
+ * revealed while editing, but contributes no hidden width in rendered mode.
931
+ */
932
+ .md-blockquote-linebreak-source-hidden {
933
+ display: none;
934
+ }
935
+
936
+ /*
937
+ * Structural quote prefixes between child blocks can be owned by a source gap
938
+ * instead of an inline continuation marker. Keep the exact gap for active
939
+ * editing, but remove it entirely from inactive layout and hit testing.
940
+ */
941
+ .md-glue-blockQuoteSourceGap.md-glue-hidden {
942
+ display: none;
943
+ }
944
+
945
+ /* A fallback-font newline glyph must not increase the source line's height. */
946
+ .md-glue-blockQuoteSourceGap > .md-ws-newline-glyph {
947
+ line-height: 0;
948
+ }
949
+
950
+ /*
951
+ * Glue normally keeps its inline footprint when hidden so source padding and
952
+ * widget gutters stay identical between active and inactive states. Hidden
953
+ * table-cell glue is the exception below: leaving it in inline flow lets its
954
+ * invisible spaces wrap around long cell content.
227
955
  */
228
956
  .md-glue-hidden {
229
957
  display: inline;
230
958
  visibility: hidden;
231
959
  }
232
960
 
961
+ /*
962
+ * Inactive table pipes stay in the DOM/source tree, but leave layout and
963
+ * hit-testing entirely. Keeping an invisible rect either in the content flow or
964
+ * over the cell padding can create phantom lines or steal clicks from visible
965
+ * text. Hidden source offsets therefore collapse to the neighboring semantic
966
+ * seam, matching other display-none markers. Visible pipes retain the per-theme
967
+ * active/source layout.
968
+ */
969
+ .md-table td>.md-glue-tableCellGlue.md-glue-hidden {
970
+ display: none;
971
+ }
972
+
973
+ /*
974
+ * Active table: take each cell's TRAILING structural glue (the source space
975
+ * after the cell text, and — via the per-theme `right: 0` rule — the last
976
+ * column's closing `|`) out of the cell's inline flow. Left in flow, that glue
977
+ * wraps below long cell content (the same wrapping the hidden-glue note above
978
+ * describes), which makes the cell two lines tall: the browser's default
979
+ * `vertical-align: middle` then re-centres the other cells' single-line content
980
+ * in Y, their runs merge into one oversized VisualLine, and the caret — sized
981
+ * directly from that line box — grows far past the line height while the
982
+ * visible pipes drift apart row-to-row. Positioning the trailing glue
983
+ * absolutely removes it from wrapping flow while keeping its real client rects
984
+ * at the static (content-line) position, so caret placement, hit-testing,
985
+ * source mapping and injectivity are unchanged. `top`/`bottom: auto` keep it on
986
+ * that content line rather than the cell's top edge. This mirrors the inactive
987
+ * `display: none` above; the leading `| ` glue deliberately stays in flow (a
988
+ * relative glyph shift, per theme) so first-text X is preserved.
989
+ *
990
+ * `:not(:first-child)` restricts this to a genuine trailing glue: a non-empty
991
+ * cell emits leading + trailing glue, but an EMPTY cell parses to a single glue
992
+ * node that is simultaneously first and last child. That lone node is the
993
+ * cell's leading pipe, so it must stay in flow like every other leading pipe;
994
+ * excluding it keeps empty cells identical to their previous (base) behaviour.
995
+ */
996
+ .md-table.md-block-active td {
997
+ position: relative;
998
+ }
999
+
1000
+ .md-table.md-block-active td>.md-glue-tableCellGlue:last-child:not(:first-child) {
1001
+ position: absolute;
1002
+ top: auto;
1003
+ bottom: auto;
1004
+ }
1005
+
233
1006
  /*
234
1007
  * Inter-block glue: the run of blank lines between two top-level blocks. It is
235
1008
  * mounted as the last inline child of the block that precedes it, so it sits at
236
1009
  * the end of that block's last line rather than on its own lines between the
237
1010
  * 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.
1011
+ * newline shows a real `↵` glyph character (`.md-ws-newline-glyph`) so each
1012
+ * source offset remains distinct. The glyphs stay on the preceding source line
1013
+ * rather than introducing line breaks. When hidden the run collapses to nothing.
242
1014
  */
243
- .md-glue-blockGap {
1015
+ .md-glue-blockGap,
1016
+ .md-glue-blockQuoteSourceGap {
244
1017
  white-space: normal;
245
1018
  }
246
1019
 
247
1020
  /*
248
1021
  * 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
1022
+ * its newlines stay inline so the run adds no height; its leading newline is painted as the blue break glyph
251
1023
  * (`.md-ws-blockbreak-glyph`).
252
1024
  */
253
1025
  .md-glue-blockBreak {
254
1026
  white-space: normal;
255
1027
  }
256
1028
 
1029
+ .md-source-editing :is(.md-paragraph, .md-heading, .md-empty-block, td),
1030
+ .md-source-editing :is(.md-text, .md-marker) {
1031
+ white-space: pre-wrap;
1032
+ }
1033
+
1034
+ .md-editor.md-source-editing .md-block,
1035
+ .md-editor.md-source-editing .md-list > li {
1036
+ margin-block: 0;
1037
+ }
1038
+
1039
+ .md-source-editing .md-empty-block {
1040
+ min-height: 1lh;
1041
+ }
1042
+
1043
+ .md-source-editing .md-list > .md-empty-block {
1044
+ list-style: none;
1045
+ counter-increment: list-item 0;
1046
+ margin-inline-start: calc(-1 * var(--md-list-indent-step, 2em));
1047
+ }
1048
+
1049
+ .md-source-editing .md-list > li > .md-empty-block {
1050
+ padding-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1051
+ }
1052
+
1053
+ .md-source-editing .md-glue-emptyLine {
1054
+ white-space: pre-wrap;
1055
+ visibility: visible;
1056
+ }
1057
+
1058
+ .md-source-editing .md-glue-blockTerminator {
1059
+ display: none;
1060
+ }
1061
+
1062
+ .md-source-editing .md-glue-lineSuffix {
1063
+ white-space: pre-wrap;
1064
+ visibility: visible;
1065
+ }
1066
+
1067
+ .md-source-editing .md-ws-newline::before {
1068
+ content: none;
1069
+ }
1070
+
1071
+ .md-source-editing :is(.md-ws-space, .md-ws-tab) {
1072
+ white-space: inherit;
1073
+ }
1074
+
1075
+ /* These source holders already have a <br> supplying their line ending. */
1076
+ .md-source-block :is(.md-hardbreak-src, .md-blockquote-linebreak-source) {
1077
+ white-space: normal;
1078
+ }
1079
+
1080
+ .md-source-block .md-blockquote-linebreak-source .md-ws-newline::before {
1081
+ content: none;
1082
+ }
1083
+
257
1084
  /*
258
1085
  * The task-list checkbox marker (`[x]`/`[ ]`) is special: instead of being
259
1086
  * removed from layout when hidden, it keeps its inline width (visibility
@@ -266,15 +1093,6 @@
266
1093
  visibility: hidden;
267
1094
  }
268
1095
 
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
1096
  /*
279
1097
  * The code-block fences (```lang / ```) each sit on their own source line. When
280
1098
  * hidden they keep their vertical footprint (visibility hidden, not display
@@ -309,6 +1127,69 @@
309
1127
  height: 16px;
310
1128
  }
311
1129
 
1130
+ /*
1131
+ * A wide table scrolls horizontally inside its wrapper (the block box) instead
1132
+ * of overflowing the page and scrolling the editor's fixed left gutter away.
1133
+ * The wrapper is the scroll viewport the selection/caret clipping measures (see
1134
+ * `BlockViewNode.scrollElement` / `blockViewportClip`); the inner `<table>`
1135
+ * keeps `width: auto` (theme-defined) so it sizes to its content and overflows.
1136
+ *
1137
+ * `width: fit-content` keeps the wrapper hugging the table's intrinsic width, so
1138
+ * a narrow table — and the active-block glow redirected onto the wrapper below —
1139
+ * stays as wide as the table (unchanged from before this wrapper existed).
1140
+ * `max-width: 100%` caps it at the content column, past which the table
1141
+ * overflows and scrolls locally. This is the standard responsive-table pattern
1142
+ * (cf. GitHub's own `width: max-content; max-width: 100%`).
1143
+ */
1144
+ .md-table-wrapper {
1145
+ overflow-x: auto;
1146
+ width: fit-content;
1147
+ max-width: 100%;
1148
+ }
1149
+
1150
+ .md-table:has(> .md-glue-blockGap) {
1151
+ position: relative;
1152
+ }
1153
+
1154
+ /* Table trivia must not generate an anonymous row when source is revealed. */
1155
+ .md-table > .md-glue-blockGap {
1156
+ position: absolute;
1157
+ left: 100%;
1158
+ bottom: 0.3em;
1159
+ }
1160
+
1161
+ .md-editor:not(.md-source-editing) .md-paragraph:has(> .md-glue-indent:first-child) {
1162
+ position: relative;
1163
+ }
1164
+
1165
+ .md-editor:not(.md-source-editing) .md-paragraph > .md-glue-indent:first-child {
1166
+ position: absolute;
1167
+ right: 100%;
1168
+ top: 0;
1169
+ }
1170
+
1171
+ /*
1172
+ * The active-block highlight is an *outset* glow (`box-shadow: 0 0 0 8px`).
1173
+ * Making the wrapper a scroll box (`overflow-x: auto`, which also forces
1174
+ * `overflow-y: auto`) clips descendant paint to its padding box, so the glow on
1175
+ * the inner active `<table>` would be cut off (the table has no horizontal
1176
+ * margin to give the shadow room). Render the generic active chrome on the
1177
+ * wrapper instead — a scroll box's own shadow is never clipped by its own
1178
+ * overflow, exactly like a code block carries the glow on its own scroller —
1179
+ * and drop it from the table, which keeps `md-block-active` purely for the
1180
+ * per-theme source-pipe styling.
1181
+ */
1182
+ :where(.md-editor:not(.md-no-active-block-highlight)) .md-table-wrapper:has(> .md-table.md-block-active) {
1183
+ background: var(--md-block-active-background, #f8f8f8);
1184
+ border-radius: 4px;
1185
+ box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
1186
+ }
1187
+
1188
+ .md-table.md-block-active {
1189
+ background: none;
1190
+ box-shadow: none;
1191
+ }
1192
+
312
1193
  .md-selection-layer {
313
1194
  position: absolute;
314
1195
  top: 0;
@@ -374,6 +1255,7 @@
374
1255
  /* Source markers occupy the gutter so toggling them never shifts content. */
375
1256
  .md-heading {
376
1257
  position: relative;
1258
+ min-height: 1lh;
377
1259
  }
378
1260
 
379
1261
  .md-heading>.md-marker:first-child {
@@ -390,7 +1272,7 @@
390
1272
  display: inline-flex;
391
1273
  align-items: center;
392
1274
  justify-content: flex-end;
393
- transform: scale(0.85);
1275
+ transform: scale(var(--md-heading-marker-scale, 0.85));
394
1276
  transform-origin: right center;
395
1277
  }
396
1278
 
@@ -403,6 +1285,18 @@
403
1285
  display: none;
404
1286
  }
405
1287
 
1288
+ /* Nested heading prefixes must not overlap their enclosing quote/list gutter. */
1289
+ .md-source-editing :is(.md-blockquote, .md-list) .md-heading > .md-marker:first-child {
1290
+ position: static;
1291
+ display: inline;
1292
+ font-size: calc(1em * var(--md-marker-font-scale));
1293
+ transform: none;
1294
+ }
1295
+
1296
+ .md-source-editing :is(.md-blockquote, .md-list) .md-heading > .md-marker-hidden:first-child {
1297
+ display: none;
1298
+ }
1299
+
406
1300
  /*
407
1301
  * Block-quote prefixes (`> `, one per quoted source line) are real
408
1302
  * `blockQuoteMarker` markers, siblings of the quote's child blocks. Each hangs
@@ -422,11 +1316,33 @@
422
1316
  position: relative;
423
1317
  }
424
1318
 
425
- .md-blockquote>.md-marker-blockQuoteMarker {
1319
+ .md-blockquote>.md-marker-blockQuoteMarker,
1320
+ .md-source-editing li > .md-glue-blockQuotePrefix {
426
1321
  position: absolute;
427
- right: calc(100% - var(--md-blockquote-pad, 0px));
1322
+ right: calc(100% - var(--md-blockquote-pad, 0px) - 1ch);
428
1323
  top: auto;
1324
+ /*
1325
+ * Reserve the optional-space column so adding it cannot move the `>` glyph,
1326
+ * then shift and scale every active quote marker consistently to leave a
1327
+ * virtual gap before body text without consuming source width. These tuned
1328
+ * properties are shared by ordinary and marker-only quote lines.
1329
+ */
1330
+ --md-blockquote-marker-shift: -0.18ch;
1331
+ --md-blockquote-marker-scale: 0.9;
1332
+ display: inline-flex;
1333
+ min-width: 2ch;
1334
+ font-size: inherit;
1335
+ line-height: inherit;
1336
+ height: 1lh;
1337
+ align-items: center;
1338
+ text-align: left;
429
1339
  white-space: pre;
1340
+ transform: translateX(var(--md-blockquote-marker-shift)) scale(var(--md-blockquote-marker-scale));
1341
+ transform-origin: left center;
1342
+ }
1343
+
1344
+ .md-source-editing li > .md-glue-blockQuotePrefix {
1345
+ right: calc(100% + var(--md-list-indent-step, 2em) - 1ch);
430
1346
  }
431
1347
 
432
1348
  /* Inactive: gone entirely (the gutter is empty, the text stays put). */
@@ -434,9 +1350,111 @@
434
1350
  display: none;
435
1351
  }
436
1352
 
437
- /* Code/math blocks scroll horizontally; their look is theme-defined. */
438
- .md-code-block {
439
- overflow-x: auto;
1353
+ /* Collapsed block-gap newlines still need one flow box per marker-only line. */
1354
+ .md-blockquote-line-anchor {
1355
+ display: block;
1356
+ }
1357
+
1358
+ /* A trailing marker-only source line follows the preceding quoted line directly. */
1359
+ .md-blockquote-marker-only-line>.md-paragraph:last-of-type {
1360
+ margin-bottom: 0;
1361
+ }
1362
+
1363
+ /* Code/math blocks scroll horizontally; their look is theme-defined. */
1364
+ .md-code-block {
1365
+ overflow-x: auto;
1366
+ }
1367
+
1368
+ .md-block.md-code-block.md-embedded-code-editor {
1369
+ background: transparent;
1370
+ padding: 0;
1371
+ }
1372
+
1373
+ /* Keep actions out of the horizontal scroller and sticky within a long block. */
1374
+ .md-code-block-container {
1375
+ display: flow-root;
1376
+ position: relative;
1377
+ min-width: 0;
1378
+ }
1379
+
1380
+ .md-code-block-container > .md-code-block {
1381
+ box-sizing: border-box;
1382
+ min-height: 36px;
1383
+ }
1384
+
1385
+ .md-code-block-actions {
1386
+ position: sticky;
1387
+ top: 0;
1388
+ z-index: 2;
1389
+ display: flex;
1390
+ align-items: center;
1391
+ justify-content: flex-end;
1392
+ gap: 6px;
1393
+ box-sizing: border-box;
1394
+ height: 32px;
1395
+ margin-bottom: -32px;
1396
+ padding: 4px 4px 0;
1397
+ opacity: 0;
1398
+ pointer-events: none;
1399
+ user-select: none;
1400
+ }
1401
+
1402
+ .md-code-block-container:hover>.md-code-block-actions,
1403
+ .md-code-block-actions:focus-within,
1404
+ .md-code-block-actions.md-code-block-copy-feedback {
1405
+ opacity: 1;
1406
+ }
1407
+
1408
+ .md-code-block-copy {
1409
+ display: inline-flex;
1410
+ align-items: center;
1411
+ justify-content: center;
1412
+ flex: none;
1413
+ width: 28px;
1414
+ height: 28px;
1415
+ padding: 4px;
1416
+ border: 1px solid var(--md-readonly-border, #b8b8b8);
1417
+ border-radius: 4px;
1418
+ background: var(--md-readonly-background, #f3f3f3);
1419
+ color: var(--md-readonly-foreground, #444444);
1420
+ cursor: pointer;
1421
+ pointer-events: auto;
1422
+ }
1423
+
1424
+ .md-code-block-copy:hover {
1425
+ background: var(--md-readonly-background-hover, #e9e9e9);
1426
+ }
1427
+
1428
+ .md-code-block-copy:focus-visible {
1429
+ outline: 2px solid var(--md-readonly-accent, #4c8bf5);
1430
+ outline-offset: 1px;
1431
+ }
1432
+
1433
+ .md-code-block-copy-status:not(:empty) {
1434
+ padding: 2px 6px;
1435
+ border-radius: 4px;
1436
+ background: var(--md-readonly-background, #f3f3f3);
1437
+ color: var(--md-readonly-foreground, #444444);
1438
+ font: 12px/1.4 sans-serif;
1439
+ }
1440
+
1441
+ @media (hover: none) {
1442
+ .md-code-block-actions {
1443
+ opacity: 1;
1444
+ }
1445
+ }
1446
+
1447
+ @media (forced-colors: active) {
1448
+ .md-code-block-copy,
1449
+ .md-code-block-copy-status:not(:empty) {
1450
+ background: ButtonFace;
1451
+ color: ButtonText;
1452
+ border-color: ButtonText;
1453
+ }
1454
+
1455
+ .md-code-block-copy:focus-visible {
1456
+ outline-color: Highlight;
1457
+ }
440
1458
  }
441
1459
 
442
1460
  .md-math-block {
@@ -447,7 +1465,8 @@
447
1465
  margin: 0;
448
1466
  }
449
1467
 
450
- .md-list li>.md-block {
1468
+ .md-list li>.md-block,
1469
+ .md-list li>.md-code-block-container>.md-code-block {
451
1470
  margin: 0;
452
1471
  }
453
1472
 
@@ -460,25 +1479,97 @@
460
1479
  position: relative;
461
1480
  }
462
1481
 
1482
+ .md-list > li {
1483
+ min-height: 1lh;
1484
+ position: relative;
1485
+ }
1486
+
463
1487
  /*
464
1488
  * The list marker is pulled into the gutter by markerKind (not `:first-child`),
465
1489
  * because a nested item may carry its source indentation as a leading glue
466
1490
  * before the marker. Gutter-positioning keeps the marker out of the inline
467
1491
  * flow so toggling it never shifts the item's text horizontally.
468
1492
  *
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.
1493
+ * The source box follows the first body line; the native reading marker is
1494
+ * never replaced or resized. Source symbols share the body's font baseline,
1495
+ * not a font-dependent optical centre of the painted asterisk.
473
1496
  */
474
1497
  .md-list-item-active>.md-marker-listItemMarker {
475
1498
  position: absolute;
476
1499
  right: 100%;
477
1500
  top: 0;
1501
+ }
1502
+
1503
+ .md-list-item-active>.md-marker-listItemMarker,
1504
+ .md-list-item-active>.md-list-gutter>.md-marker-listItemMarker,
1505
+ .md-source-editing .md-list-gutter > .md-marker-listItemMarker {
478
1506
  line-height: inherit;
1507
+ height: calc(1lh / var(--md-marker-font-scale));
1508
+ display: inline-flex;
1509
+ align-items: center;
1510
+ justify-content: flex-end;
1511
+ white-space: pre;
1512
+ }
1513
+
1514
+ /*
1515
+ * `display: inline-flex` above outranks the plain `.md-marker-hidden`
1516
+ * (`display: none`), so — exactly as for headings — re-hide the marker here for
1517
+ * the states that ask for it, otherwise the bullet could never be hidden.
1518
+ */
1519
+ .md-list-item-active>.md-marker-listItemMarker.md-marker-hidden,
1520
+ .md-list-item-active>.md-list-gutter>.md-marker-listItemMarker.md-marker-hidden {
1521
+ display: none;
1522
+ }
1523
+
1524
+ /* An unfinished marker still uses the gutter of its completed "marker + space" prefix. */
1525
+ .md-list-item-incomplete > .md-marker-listItemMarker::after,
1526
+ .md-list-item-incomplete > .md-list-gutter > .md-marker-listItemMarker::after {
1527
+ content: ' ';
479
1528
  white-space: pre;
480
1529
  }
481
1530
 
1531
+ .md-list-item-incomplete .md-marker-listItemMarker > .md-list-item-line-anchor {
1532
+ font-size: calc(1em / var(--md-marker-font-scale));
1533
+ }
1534
+
1535
+ .md-marker-listItemMarker:has(> .md-list-marker-symbol) {
1536
+ font-family: inherit;
1537
+ --md-marker-font-scale: 1;
1538
+ }
1539
+
1540
+ .md-list-marker-symbol {
1541
+ display: inline-block;
1542
+ flex: 0 0 1em;
1543
+ width: 1em;
1544
+ text-align: center;
1545
+ }
1546
+
1547
+ .md-marker-listItemMarker:has(> .md-list-marker-symbol) > :is(.md-ws-space, .md-ws-tab),
1548
+ .md-source-editing .md-list-continuation-separator {
1549
+ font-family: var(--md-marker-font-family);
1550
+ word-spacing: calc(0.5em - 1ch + var(--md-list-marker-reserve) / var(--md-list-marker-spaces));
1551
+ tab-size: calc(0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces));
1552
+ }
1553
+
1554
+ .md-list-item-incomplete > .md-marker-listItemMarker:has(> .md-list-marker-symbol)::after,
1555
+ .md-list-item-incomplete > .md-list-gutter > .md-marker-listItemMarker:has(> .md-list-marker-symbol)::after {
1556
+ width: 0.5em;
1557
+ }
1558
+
1559
+ /*
1560
+ * An inactive ordered item uses the browser's native `::marker`. Match its
1561
+ * typography when revealing the source marker so switching the active item
1562
+ * does not change the number's width or horizontal position: an ordered marker
1563
+ * opts out of the muted size step entirely, which also makes the `1lh`
1564
+ * compensation above a no-op for it.
1565
+ */
1566
+ ol.md-list>.md-list-item-active>.md-marker-listItemMarker,
1567
+ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker,
1568
+ .md-source-editing ol.md-list > li > .md-list-gutter > .md-marker-listItemMarker {
1569
+ font-family: inherit;
1570
+ --md-marker-font-scale: 1;
1571
+ }
1572
+
482
1573
  /*
483
1574
  * A nested item's source indentation precedes its bullet (`␣␣- text`). The
484
1575
  * indent glue and the bullet are mounted together in this gutter span, which is
@@ -507,8 +1598,66 @@
507
1598
  justify-content: space-between;
508
1599
  }
509
1600
 
1601
+ .md-source-editing .md-list-gutter {
1602
+ top: 0;
1603
+ height: 1lh;
1604
+ align-items: center;
1605
+ }
1606
+
1607
+ .md-source-editing .md-list-gutter > .md-glue-indent,
1608
+ .md-source-editing .md-list-continuation-indent {
1609
+ --md-source-indent-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em));
1610
+ --md-source-space-width: calc(var(--md-source-indent-width) / var(--md-indent-length));
1611
+ flex-basis: var(--md-source-indent-width);
1612
+ display: block;
1613
+ font-family: var(--md-marker-font-family);
1614
+ /* Stretch the source character itself so DOM ranges and selections fill the cell too. */
1615
+ word-spacing: calc(var(--md-source-space-width) - 1ch);
1616
+ tab-size: var(--md-source-space-width);
1617
+ }
1618
+
1619
+ .md-source-editing .md-task-list-item > .md-list-gutter > .md-glue-indent {
1620
+ --md-source-indent-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em) / 2);
1621
+ }
1622
+
1623
+ .md-source-editing .md-list-continuation-prefix {
1624
+ font-family: var(--md-marker-font-family);
1625
+ white-space: pre;
1626
+ }
1627
+
1628
+ .md-source-editing .md-list-continuation-prefix > span {
1629
+ display: inline;
1630
+ }
1631
+
1632
+ .md-source-editing .md-list-continuation-symbol {
1633
+ word-spacing: calc(1em - 1ch);
1634
+ }
1635
+
1636
+ .md-source-editing .md-list-continuation-outside {
1637
+ 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));
1638
+ }
1639
+
1640
+ .md-source-editing .md-list-gutter > .md-marker-listItemMarker.md-marker-hidden {
1641
+ display: inline-flex;
1642
+ visibility: hidden;
1643
+ }
1644
+
510
1645
  .md-list-gutter>.md-marker-listItemMarker {
511
1646
  flex: 0 0 auto;
1647
+ white-space: pre;
1648
+ }
1649
+
1650
+ /*
1651
+ * A nested item's gutter stays one body line tall. The marker has the same
1652
+ * compensated line box as a top-level marker, including when it hosts the
1653
+ * incomplete item's zero-source caret anchor.
1654
+ *
1655
+ * The gutter and source symbol carry body typography, so their baselines stay
1656
+ * aligned without measuring fonts or changing native reading markers.
1657
+ */
1658
+ .md-list-item-active>.md-list-gutter {
1659
+ height: 1lh;
1660
+ align-items: center;
512
1661
  }
513
1662
 
514
1663
 
@@ -523,6 +1672,20 @@
523
1672
  white-space: pre;
524
1673
  }
525
1674
 
1675
+ /*
1676
+ * A continuation-line indent inside a paragraph is source-only padding. When
1677
+ * inactive, the preceding soft-break newline already collapses to the single
1678
+ * rendered space Markdown requires; retaining the hidden indent would add the
1679
+ * tab/space run's width on top of it.
1680
+ */
1681
+ .md-paragraph>.md-glue-indent.md-glue-hidden {
1682
+ display: none;
1683
+ }
1684
+
1685
+ .md-source-editing .md-paragraph>.md-glue-indent.md-glue-hidden {
1686
+ display: inline;
1687
+ }
1688
+
526
1689
  /*
527
1690
  * A loose list item's later block (its second paragraph etc.) owns the source
528
1691
  * continuation indent that precedes it as its `leadingTrivia`. Like a nested
@@ -532,12 +1695,14 @@
532
1695
  * active (the footprint is identical in both states, so the text never shifts).
533
1696
  */
534
1697
  .md-list li>.md-block,
535
- .md-task-list-item>.md-block {
1698
+ .md-task-list-item>.md-block,
1699
+ .md-list li>.md-code-block-container>.md-code-block {
536
1700
  position: relative;
537
1701
  }
538
1702
 
539
1703
  .md-list li>.md-block>.md-glue-indent:first-child,
540
- .md-task-list-item>.md-block>.md-glue-indent:first-child {
1704
+ .md-task-list-item>.md-block>.md-glue-indent:first-child,
1705
+ .md-list li>.md-code-block-container>.md-code-block>.md-glue-indent:first-child {
541
1706
  position: absolute;
542
1707
  right: 100%;
543
1708
  top: 0;
@@ -546,34 +1711,140 @@
546
1711
  .md-task-list-item {
547
1712
  list-style: none;
548
1713
  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
1714
  }
557
1715
 
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 {
1716
+ .md-list > li {
1717
+ --md-list-label-reserve: 0em;
1718
+ --md-list-marker-reserve: var(--md-list-label-reserve);
1719
+ --md-list-source-padding: 0em;
1720
+ }
1721
+
1722
+ .md-list > .md-list-item-active {
1723
+ --md-list-source-padding: calc((var(--md-list-marker-spaces) - 1) * 0.5em);
1724
+ }
1725
+
1726
+ .md-list > .md-task-list-item {
1727
+ --md-list-marker-reserve: 0em;
1728
+ }
1729
+
1730
+ .md-list-with-task-items > li:not(.md-empty-block) {
1731
+ --md-list-label-reserve: 0.5em;
1732
+ }
1733
+
1734
+ .md-editor .md-list > li > .md-paragraph {
1735
+ padding-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1736
+ }
1737
+
1738
+ .md-editor .md-list > li > .md-list-item-line-anchor {
1739
+ margin-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1740
+ }
1741
+
1742
+ .md-editor .md-list > li > .md-marker-listItemMarker {
1743
+ right: calc(100% - (var(--md-list-label-reserve) + var(--md-list-source-padding)) / var(--md-marker-font-scale));
1744
+ }
1745
+
1746
+ .md-editor .md-list-gutter {
1747
+ right: calc(100% - var(--md-list-label-reserve) - var(--md-list-source-padding));
1748
+ }
1749
+
1750
+ .md-source-editing .md-marker-listItemMarker {
1751
+ word-spacing: calc(var(--md-list-marker-reserve) / var(--md-marker-font-scale) / var(--md-list-marker-spaces));
1752
+ }
1753
+
1754
+ /* Keep the mandatory separator's native width; each extra source space adds a body-sized half-em cell. */
1755
+ .md-source-editing .md-marker-listItemMarker > :is(.md-ws-space, .md-ws-tab) ~ :is(.md-ws-space, .md-ws-tab) {
1756
+ font-family: var(--md-marker-font-family);
1757
+ word-spacing: calc((0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces)) / var(--md-marker-font-scale) - 1ch);
1758
+ tab-size: calc((0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces)) / var(--md-marker-font-scale));
1759
+ }
1760
+
1761
+ .md-task-separator {
1762
+ position: absolute;
1763
+ left: calc(var(--md-list-source-padding) - 1em + 1.5ch * var(--md-marker-font-scale));
1764
+ top: 0;
1765
+ font-family: var(--md-marker-font-family);
1766
+ white-space: pre;
1767
+ word-spacing: calc((1.5em - 1.5ch * var(--md-marker-font-scale)) / var(--md-separator-length) - 1ch);
1768
+ tab-size: calc((1.5em - 1.5ch * var(--md-marker-font-scale)) / var(--md-separator-length));
1769
+ }
1770
+
1771
+ .md-task-list-item>.md-paragraph>.md-glue-taskListCheck {
1772
+ position: absolute;
1773
+ top: 0;
1774
+ font-family: var(--md-marker-font-family);
1775
+ font-size: calc(1em * var(--md-marker-font-scale));
1776
+ left: calc((var(--md-list-source-padding) - 1em) / var(--md-marker-font-scale) - 1.5ch);
1777
+ width: 3ch;
1778
+ }
1779
+
1780
+ .md-source-editing .md-task-list-item > .md-paragraph > .md-glue-taskListCheck {
1781
+ position: static;
566
1782
  display: inline-block;
567
- width: var(--md-task-marker-width);
1783
+ margin-inline-start: calc((-1em - var(--md-list-label-reserve)) / var(--md-marker-font-scale) - 1.5ch);
568
1784
  }
569
1785
 
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);
1786
+ .md-source-editing .md-task-separator {
1787
+ position: static;
1788
+ }
1789
+
1790
+ .md-source-editing .md-list li > .md-paragraph .md-list-continuation-gutter {
1791
+ position: absolute;
1792
+ right: calc(100% - var(--md-list-label-reserve) - var(--md-list-source-padding));
1793
+ top: auto;
1794
+ white-space: pre;
1795
+ }
1796
+
1797
+ .md-source-editing .md-list .md-code-block-container:has(> .md-code-list-source) {
1798
+ display: block;
1799
+ --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));
1800
+ margin-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding) - var(--md-list-prefix-width));
1801
+ }
1802
+
1803
+ .md-source-editing .md-list .md-code-list-source {
1804
+ position: relative;
1805
+ font-size: inherit;
1806
+ border-inline-start-width: 0;
1807
+ padding-inline-start: var(--md-list-prefix-width);
1808
+ }
1809
+
1810
+ .md-source-editing .md-list li > .md-code-block-container > .md-code-list-source > .md-list-continuation-prefix:first-child {
1811
+ right: calc(100% - var(--md-list-prefix-width));
1812
+ top: auto;
1813
+ }
1814
+
1815
+ .md-code-source-line {
1816
+ position: relative;
1817
+ }
1818
+
1819
+ .md-code-source-line > .md-list-continuation-prefix {
1820
+ position: absolute;
1821
+ right: 100%;
1822
+ }
1823
+
1824
+ .md-editor .md-task-list-item > .md-list-gutter {
1825
+ right: calc(100% - var(--md-list-source-padding));
1826
+ }
1827
+
1828
+ .md-task-list-item > .md-list-gutter::after {
1829
+ content: '';
1830
+ font-family: var(--md-marker-font-family);
1831
+ font-size: calc(1em * var(--md-marker-font-scale));
1832
+ flex: 0 0 calc(1em / var(--md-marker-font-scale) + 1.5ch);
1833
+ }
1834
+
1835
+ .md-task-list-item > .md-block + .md-block:not(.md-list) {
1836
+ padding-left: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1837
+ }
1838
+
1839
+ .md-task-list-item > .md-list {
1840
+ padding-left: var(--md-list-indent-step, 2em);
1841
+ }
1842
+
1843
+ .md-task-list-item > .md-checkbox {
1844
+ font-family: var(--md-marker-font-family);
1845
+ font-size: calc(1em * var(--md-marker-font-scale));
1846
+ left: calc((var(--md-list-source-padding) - 1em) / var(--md-marker-font-scale) - 8px);
1847
+ top: calc((1lh / var(--md-marker-font-scale) - 16px) / 2);
577
1848
  }
578
1849
 
579
1850
  .md-checkbox {
@@ -588,6 +1859,7 @@
588
1859
  position: absolute;
589
1860
  left: 0;
590
1861
  top: 0.25em;
1862
+ z-index: 1;
591
1863
  cursor: pointer;
592
1864
  transition: background-color 0.15s ease, border-color 0.15s ease;
593
1865
  }
@@ -600,8 +1872,8 @@
600
1872
  .md-checkbox:checked::after {
601
1873
  content: '';
602
1874
  position: absolute;
603
- left: 3px;
604
- top: 0px;
1875
+ left: 2.5px;
1876
+ top: -1px;
605
1877
  width: 5px;
606
1878
  height: 9px;
607
1879
  border: solid white;
@@ -613,6 +1885,39 @@
613
1885
  border-color: #888;
614
1886
  }
615
1887
 
1888
+ /*
1889
+ * The rotating "broken rounded-square" progress ring for an inactive task item
1890
+ * whose text begins with the hidden `:running:` marker (see
1891
+ * `ListItemViewData.isRunning`). Rendered as a conic-gradient ring — masked so
1892
+ * only the ring (not its center) paints — with a transparent gap that spins,
1893
+ * reading as a segmented spinner rather than a checked/unchecked box.
1894
+ */
1895
+ .md-checkbox-running,
1896
+ .md-checkbox-running:checked {
1897
+ padding: 2px;
1898
+ border: 0;
1899
+ border-radius: 4px;
1900
+ background: conic-gradient(
1901
+ transparent 0deg 42deg,
1902
+ #bbb 62deg 360deg
1903
+ );
1904
+ -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
1905
+ -webkit-mask-composite: xor;
1906
+ mask-composite: exclude;
1907
+ animation: md-checkbox-spin 0.8s linear infinite;
1908
+ opacity: 1;
1909
+ }
1910
+
1911
+ @keyframes md-checkbox-spin {
1912
+ to {
1913
+ transform: rotate(360deg);
1914
+ }
1915
+ }
1916
+
1917
+ .md-checkbox-running:hover {
1918
+ border-color: transparent;
1919
+ }
1920
+
616
1921
  .md-checkbox:checked:hover {
617
1922
  background-color: #3a73d4;
618
1923
  border-color: #3a73d4;
@@ -623,14 +1928,66 @@
623
1928
  opacity: 0.6;
624
1929
  }
625
1930
 
1931
+ .md-checkbox-running:disabled {
1932
+ opacity: 1;
1933
+ }
1934
+
1935
+ @media (prefers-reduced-motion: reduce) {
1936
+ .md-checkbox-running {
1937
+ animation: none !important;
1938
+ }
1939
+ }
1940
+
1941
+ /*
1942
+ * The `:running:` marker hidden from an inactive task item's rendered text
1943
+ * (see `TextViewData.hiddenPrefixLength`). It stays real, selectable source —
1944
+ * only visually hidden, per "Hidden markers remain real source" — so it takes
1945
+ * no layout space in either state.
1946
+ */
1947
+ .md-runner-marker {
1948
+ display: none;
1949
+ }
1950
+
626
1951
  .md-cursor {
627
1952
  position: absolute;
628
1953
  width: 2px;
629
1954
  background: var(--md-cursor-background, #000);
630
1955
  pointer-events: none;
1956
+ }
1957
+
1958
+ /*
1959
+ * The painted caret is only shown while the editor is genuinely focused — focus
1960
+ * rests inside it and its window is focused, mirrored onto the root as
1961
+ * `.md-focused`. When unfocused, hide the caret element but keep its layout box
1962
+ * (so caret geometry, selection and comment anchoring are unchanged) and stop
1963
+ * the blink. Adding the animation on focus restarts it from 0% (a solid caret).
1964
+ */
1965
+ .md-editor:not(.md-focused) .md-cursor {
1966
+ visibility: hidden;
1967
+ }
1968
+
1969
+ .md-editor.md-focused .md-cursor {
631
1970
  animation: md-cursor-blink 1s step-end infinite;
632
1971
  }
633
1972
 
1973
+ /*
1974
+ * Read-only mode retains the logical caret for selection and comment anchoring.
1975
+ * Hide only its painted element so unlocking can restore it in place.
1976
+ */
1977
+ .md-editor.md-readonly .md-cursor {
1978
+ visibility: hidden;
1979
+ }
1980
+
1981
+ .md-editor.md-readonly-editing-attempt {
1982
+ animation: md-readonly-editing-attempt 300ms ease-out;
1983
+ }
1984
+
1985
+ @keyframes md-readonly-editing-attempt {
1986
+ 50% {
1987
+ box-shadow: inset 0 0 0 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
1988
+ }
1989
+ }
1990
+
634
1991
  @keyframes md-cursor-blink {
635
1992
 
636
1993
  0%,
@@ -641,4 +1998,189 @@
641
1998
  50% {
642
1999
  opacity: 0;
643
2000
  }
2001
+ }
2002
+
2003
+ /*
2004
+ * Edit / read-only lock toggle.
2005
+ *
2006
+ * The sticky overlay never changes text flow or the symmetric content margins.
2007
+ * Narrow margins let the control overlap content rather than reserving a rail.
2008
+ * Colors use local `--md-readonly-*` custom
2009
+ * properties with literal fallbacks so this base file stays theme-agnostic
2010
+ * (themes may override them).
2011
+ */
2012
+ .md-readonly-toggle-host {
2013
+ position: sticky;
2014
+ top: var(--md-readonly-toggle-inset);
2015
+ height: 0;
2016
+ z-index: 10;
2017
+ pointer-events: none;
2018
+ }
2019
+
2020
+ .md-readonly-toggle {
2021
+ position: absolute;
2022
+ top: 4px;
2023
+ right: var(--md-readonly-toggle-inset);
2024
+ pointer-events: auto;
2025
+ display: inline-grid;
2026
+ grid-template-columns: repeat(3, 24px);
2027
+ align-items: center;
2028
+ justify-items: center;
2029
+ gap: 2px;
2030
+ box-sizing: border-box;
2031
+ width: var(--md-readonly-toggle-width);
2032
+ height: var(--md-readonly-toggle-height);
2033
+ padding: 3px;
2034
+ overflow: hidden;
2035
+ direction: ltr;
2036
+ appearance: none;
2037
+ border-radius: 999px;
2038
+ border: 1px solid var(--md-readonly-border, #b8b8b8);
2039
+ background: var(--md-readonly-background, #f3f3f3);
2040
+ color: var(--md-readonly-foreground, #444444);
2041
+ font-size: 16px;
2042
+ line-height: 1;
2043
+ cursor: pointer;
2044
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
2045
+ transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
2046
+ }
2047
+
2048
+ .md-readonly-toggle::after {
2049
+ content: '';
2050
+ position: absolute;
2051
+ z-index: 2;
2052
+ top: -8px;
2053
+ bottom: -8px;
2054
+ left: -30px;
2055
+ width: 24px;
2056
+ background: linear-gradient(90deg,
2057
+ transparent,
2058
+ var(--md-readonly-shine-edge, rgba(255, 255, 255, 0.16)) 24%,
2059
+ var(--md-readonly-shine, #ffffff) 50%,
2060
+ var(--md-readonly-shine-edge, rgba(255, 255, 255, 0.16)) 76%,
2061
+ transparent);
2062
+ box-shadow: 0 0 8px 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
2063
+ opacity: 0;
2064
+ pointer-events: none;
2065
+ transform: skewX(-20deg);
2066
+ }
2067
+
2068
+ .md-readonly-toggle.md-readonly-toggle-shine::after {
2069
+ animation: md-readonly-toggle-shine 2s linear;
2070
+ will-change: transform, opacity;
2071
+ }
2072
+
2073
+ @keyframes md-readonly-toggle-shine {
2074
+ 0% {
2075
+ opacity: 0;
2076
+ transform: translateX(0) skewX(-20deg);
2077
+ }
2078
+
2079
+ 12%,
2080
+ 88% {
2081
+ opacity: 1;
2082
+ }
2083
+
2084
+ 100% {
2085
+ opacity: 0;
2086
+ transform: translateX(122px) skewX(-20deg);
2087
+ }
2088
+ }
2089
+
2090
+ .md-readonly-toggle:hover {
2091
+ border-color: var(--md-readonly-border-hover, #8d8d8d);
2092
+ background: var(--md-readonly-background-hover, #e9e9e9);
2093
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.1);
2094
+ }
2095
+
2096
+ .md-readonly-toggle:focus-visible {
2097
+ outline: 2px solid var(--md-readonly-accent, #4c8bf5);
2098
+ outline-offset: 1px;
2099
+ }
2100
+
2101
+ .md-readonly-toggle .md-readonly-toggle-indicator {
2102
+ position: absolute;
2103
+ top: 50%;
2104
+ left: 3px;
2105
+ width: 24px;
2106
+ height: 24px;
2107
+ border-radius: 50%;
2108
+ background: var(--md-readonly-accent, #4c8bf5);
2109
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
2110
+ transform: translate(26px, -50%);
2111
+ transition: background-color 0.12s ease, transform 0.16s ease;
2112
+ }
2113
+
2114
+ .md-readonly-toggle .md-readonly-toggle-icon {
2115
+ position: relative;
2116
+ z-index: 1;
2117
+ display: block;
2118
+ width: 16px;
2119
+ height: 16px;
2120
+ color: var(--md-readonly-foreground, #444444);
2121
+ opacity: 0.62;
2122
+ pointer-events: none;
2123
+ transition: color 0.12s ease, opacity 0.12s ease;
2124
+ }
2125
+
2126
+ .md-readonly-toggle:not(.md-readonly-toggle-locked) .md-readonly-toggle-icon-editing,
2127
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
2128
+ color: var(--md-readonly-accent-foreground, #ffffff);
2129
+ opacity: 1;
2130
+ }
2131
+
2132
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-indicator {
2133
+ transform: translate(0, -50%);
2134
+ }
2135
+
2136
+ @media (prefers-reduced-motion: reduce) {
2137
+
2138
+ .md-editor.md-readonly-editing-attempt,
2139
+ .md-readonly-toggle,
2140
+ .md-readonly-toggle .md-readonly-toggle-indicator,
2141
+ .md-readonly-toggle .md-readonly-toggle-icon,
2142
+ .md-readonly-toggle.md-readonly-toggle-shine::after {
2143
+ animation: none;
2144
+ transition: none;
2145
+ }
2146
+ }
2147
+
2148
+ @media (forced-colors: active) {
2149
+ .md-readonly-toggle {
2150
+ forced-color-adjust: none;
2151
+ border-color: ButtonText;
2152
+ background: ButtonFace;
2153
+ color: ButtonText;
2154
+ box-shadow: none;
2155
+ }
2156
+
2157
+ .md-readonly-toggle::after {
2158
+ display: none;
2159
+ }
2160
+
2161
+ .md-readonly-toggle:hover {
2162
+ border-color: Highlight;
2163
+ background: ButtonFace;
2164
+ box-shadow: none;
2165
+ }
2166
+
2167
+ .md-readonly-toggle:focus-visible {
2168
+ outline-color: Highlight;
2169
+ }
2170
+
2171
+ .md-readonly-toggle .md-readonly-toggle-indicator {
2172
+ background: Highlight;
2173
+ box-shadow: none;
2174
+ }
2175
+
2176
+ .md-readonly-toggle .md-readonly-toggle-icon {
2177
+ color: ButtonText;
2178
+ opacity: 1;
2179
+ }
2180
+
2181
+ .md-readonly-toggle:not(.md-readonly-toggle-locked):not(.md-readonly-toggle-source) .md-readonly-toggle-icon-editing,
2182
+ .md-readonly-toggle.md-readonly-toggle-source .md-readonly-toggle-icon-source,
2183
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
2184
+ color: HighlightText;
2185
+ }
644
2186
  }