@vscode/markdown-editor 0.0.2-112 → 0.0.2-114

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.
@@ -25,6 +25,8 @@
25
25
  */
26
26
 
27
27
  .md-editor {
28
+ --md-marker-font-family: 'Cascadia Code', 'Fira Code', monospace;
29
+ --md-marker-font-scale: 0.85;
28
30
  display: flow-root;
29
31
  outline: none;
30
32
  /* The editor paints its own cursor (`.md-cursor`); hide the native caret. */
@@ -697,13 +699,7 @@
697
699
 
698
700
  .md-marker {
699
701
  color: #999;
700
- font-family: 'Cascadia Code', 'Fira Code', monospace;
701
- /*
702
- * Revealed source is painted a step smaller than body text. Published as a
703
- * custom property because a gutter marker has to undo it to size its box
704
- * against the body line box — see `.md-list-item-active>.md-marker-listItemMarker`.
705
- */
706
- --md-marker-font-scale: 0.85;
702
+ font-family: var(--md-marker-font-family);
707
703
  font-size: calc(1em * var(--md-marker-font-scale));
708
704
  display: inline;
709
705
  overflow: hidden;
@@ -928,6 +924,11 @@ pre.md-unhandled-scroll.md-code-block {
928
924
  display: none;
929
925
  }
930
926
 
927
+ /* A fallback-font newline glyph must not increase the source line's height. */
928
+ .md-glue-blockQuoteSourceGap > .md-ws-newline-glyph {
929
+ line-height: 0;
930
+ }
931
+
931
932
  /*
932
933
  * Glue normally keeps its inline footprint when hidden so source padding and
933
934
  * widget gutters stay identical between active and inactive states. Hidden
@@ -989,10 +990,9 @@ pre.md-unhandled-scroll.md-code-block {
989
990
  * mounted as the last inline child of the block that precedes it, so it sits at
990
991
  * the end of that block's last line rather than on its own lines between the
991
992
  * blocks. When a neighbouring block is active it is revealed: each blank-line
992
- * newline shows a real `↵` glyph character (`.md-ws-newline-glyph`) while the
993
- * trailing line-terminator `\n` collapses (`white-space: normal`) so the run
994
- * adds no line break and no height — active and inactive therefore have the
995
- * same height. When hidden it collapses to nothing.
993
+ * newline shows a real `↵` glyph character (`.md-ws-newline-glyph`) so each
994
+ * source offset remains distinct. The glyphs stay on the preceding source line
995
+ * rather than introducing line breaks. When hidden the run collapses to nothing.
996
996
  */
997
997
  .md-glue-blockGap,
998
998
  .md-glue-blockQuoteSourceGap {
@@ -1001,14 +1001,64 @@ pre.md-unhandled-scroll.md-code-block {
1001
1001
 
1002
1002
  /*
1003
1003
  * The structural block break between two top-level blocks. Like `.md-glue-blockGap`
1004
- * its trailing line-terminator `\n` collapses (`white-space: normal`) so the run
1005
- * adds no height; its leading newline is painted as the blue break glyph
1004
+ * its newlines stay inline so the run adds no height; its leading newline is painted as the blue break glyph
1006
1005
  * (`.md-ws-blockbreak-glyph`).
1007
1006
  */
1008
1007
  .md-glue-blockBreak {
1009
1008
  white-space: normal;
1010
1009
  }
1011
1010
 
1011
+ .md-source-editing :is(.md-paragraph, .md-heading, .md-empty-block, td),
1012
+ .md-source-editing :is(.md-text, .md-marker) {
1013
+ white-space: pre-wrap;
1014
+ }
1015
+
1016
+ .md-editor.md-source-editing .md-block,
1017
+ .md-editor.md-source-editing .md-list > li {
1018
+ margin-block: 0;
1019
+ }
1020
+
1021
+ .md-source-editing .md-empty-block {
1022
+ min-height: 1lh;
1023
+ }
1024
+
1025
+ .md-source-editing .md-list > .md-empty-block {
1026
+ list-style: none;
1027
+ counter-increment: list-item 0;
1028
+ margin-inline-start: calc(-1 * var(--md-list-indent-step, 2em));
1029
+ }
1030
+
1031
+ .md-source-editing .md-glue-emptyLine {
1032
+ white-space: pre-wrap;
1033
+ visibility: visible;
1034
+ }
1035
+
1036
+ .md-source-editing .md-glue-blockTerminator {
1037
+ display: none;
1038
+ }
1039
+
1040
+ .md-source-editing .md-glue-lineSuffix {
1041
+ white-space: pre-wrap;
1042
+ visibility: visible;
1043
+ }
1044
+
1045
+ .md-source-editing .md-ws-newline::before {
1046
+ content: none;
1047
+ }
1048
+
1049
+ .md-source-editing :is(.md-ws-space, .md-ws-tab) {
1050
+ white-space: inherit;
1051
+ }
1052
+
1053
+ /* These source holders already have a <br> supplying their line ending. */
1054
+ .md-source-block :is(.md-hardbreak-src, .md-blockquote-linebreak-source) {
1055
+ white-space: normal;
1056
+ }
1057
+
1058
+ .md-source-block .md-blockquote-linebreak-source .md-ws-newline::before {
1059
+ content: none;
1060
+ }
1061
+
1012
1062
  /*
1013
1063
  * The task-list checkbox marker (`[x]`/`[ ]`) is special: instead of being
1014
1064
  * removed from layout when hidden, it keeps its inline width (visibility
@@ -1075,6 +1125,27 @@ pre.md-unhandled-scroll.md-code-block {
1075
1125
  max-width: 100%;
1076
1126
  }
1077
1127
 
1128
+ .md-table:has(> .md-glue-blockGap) {
1129
+ position: relative;
1130
+ }
1131
+
1132
+ /* Table trivia must not generate an anonymous row when source is revealed. */
1133
+ .md-table > .md-glue-blockGap {
1134
+ position: absolute;
1135
+ left: 100%;
1136
+ bottom: 0.3em;
1137
+ }
1138
+
1139
+ .md-editor:not(.md-source-editing) .md-paragraph:has(> .md-glue-indent:first-child) {
1140
+ position: relative;
1141
+ }
1142
+
1143
+ .md-editor:not(.md-source-editing) .md-paragraph > .md-glue-indent:first-child {
1144
+ position: absolute;
1145
+ right: 100%;
1146
+ top: 0;
1147
+ }
1148
+
1078
1149
  /*
1079
1150
  * The active-block highlight is an *outset* glow (`box-shadow: 0 0 0 8px`).
1080
1151
  * Making the wrapper a scroll box (`overflow-x: auto`, which also forces
@@ -1162,6 +1233,7 @@ pre.md-unhandled-scroll.md-code-block {
1162
1233
  /* Source markers occupy the gutter so toggling them never shifts content. */
1163
1234
  .md-heading {
1164
1235
  position: relative;
1236
+ min-height: 1lh;
1165
1237
  }
1166
1238
 
1167
1239
  .md-heading>.md-marker:first-child {
@@ -1191,6 +1263,18 @@ pre.md-unhandled-scroll.md-code-block {
1191
1263
  display: none;
1192
1264
  }
1193
1265
 
1266
+ /* Nested heading prefixes must not overlap their enclosing quote/list gutter. */
1267
+ .md-source-editing :is(.md-blockquote, .md-list) .md-heading > .md-marker:first-child {
1268
+ position: static;
1269
+ display: inline;
1270
+ font-size: calc(1em * var(--md-marker-font-scale));
1271
+ transform: none;
1272
+ }
1273
+
1274
+ .md-source-editing :is(.md-blockquote, .md-list) .md-heading > .md-marker-hidden:first-child {
1275
+ display: none;
1276
+ }
1277
+
1194
1278
  /*
1195
1279
  * Block-quote prefixes (`> `, one per quoted source line) are real
1196
1280
  * `blockQuoteMarker` markers, siblings of the quote's child blocks. Each hangs
@@ -1210,7 +1294,8 @@ pre.md-unhandled-scroll.md-code-block {
1210
1294
  position: relative;
1211
1295
  }
1212
1296
 
1213
- .md-blockquote>.md-marker-blockQuoteMarker {
1297
+ .md-blockquote>.md-marker-blockQuoteMarker,
1298
+ .md-source-editing li > .md-glue-blockQuotePrefix {
1214
1299
  position: absolute;
1215
1300
  right: calc(100% - var(--md-blockquote-pad, 0px) - 1ch);
1216
1301
  top: auto;
@@ -1234,6 +1319,10 @@ pre.md-unhandled-scroll.md-code-block {
1234
1319
  transform-origin: left center;
1235
1320
  }
1236
1321
 
1322
+ .md-source-editing li > .md-glue-blockQuotePrefix {
1323
+ right: calc(100% + var(--md-list-indent-step, 2em) - 1ch);
1324
+ }
1325
+
1237
1326
  /* Inactive: gone entirely (the gutter is empty, the text stays put). */
1238
1327
  .md-blockquote>.md-marker-blockQuoteMarker.md-marker-hidden {
1239
1328
  display: none;
@@ -1254,6 +1343,93 @@ pre.md-unhandled-scroll.md-code-block {
1254
1343
  overflow-x: auto;
1255
1344
  }
1256
1345
 
1346
+ /* Keep actions out of the horizontal scroller and sticky within a long block. */
1347
+ .md-code-block-container {
1348
+ display: flow-root;
1349
+ position: relative;
1350
+ min-width: 0;
1351
+ }
1352
+
1353
+ .md-code-block-container > .md-code-block {
1354
+ box-sizing: border-box;
1355
+ min-height: 36px;
1356
+ }
1357
+
1358
+ .md-code-block-actions {
1359
+ position: sticky;
1360
+ top: 0;
1361
+ z-index: 2;
1362
+ display: flex;
1363
+ align-items: center;
1364
+ justify-content: flex-end;
1365
+ gap: 6px;
1366
+ box-sizing: border-box;
1367
+ height: 32px;
1368
+ margin-bottom: -32px;
1369
+ padding: 4px 4px 0;
1370
+ opacity: 0;
1371
+ pointer-events: none;
1372
+ user-select: none;
1373
+ }
1374
+
1375
+ .md-code-block-container:hover>.md-code-block-actions,
1376
+ .md-code-block-actions:focus-within,
1377
+ .md-code-block-actions.md-code-block-copy-feedback {
1378
+ opacity: 1;
1379
+ }
1380
+
1381
+ .md-code-block-copy {
1382
+ display: inline-flex;
1383
+ align-items: center;
1384
+ justify-content: center;
1385
+ flex: none;
1386
+ width: 28px;
1387
+ height: 28px;
1388
+ padding: 4px;
1389
+ border: 1px solid var(--md-readonly-border, #b8b8b8);
1390
+ border-radius: 4px;
1391
+ background: var(--md-readonly-background, #f3f3f3);
1392
+ color: var(--md-readonly-foreground, #444444);
1393
+ cursor: pointer;
1394
+ pointer-events: auto;
1395
+ }
1396
+
1397
+ .md-code-block-copy:hover {
1398
+ background: var(--md-readonly-background-hover, #e9e9e9);
1399
+ }
1400
+
1401
+ .md-code-block-copy:focus-visible {
1402
+ outline: 2px solid var(--md-readonly-accent, #4c8bf5);
1403
+ outline-offset: 1px;
1404
+ }
1405
+
1406
+ .md-code-block-copy-status:not(:empty) {
1407
+ padding: 2px 6px;
1408
+ border-radius: 4px;
1409
+ background: var(--md-readonly-background, #f3f3f3);
1410
+ color: var(--md-readonly-foreground, #444444);
1411
+ font: 12px/1.4 sans-serif;
1412
+ }
1413
+
1414
+ @media (hover: none) {
1415
+ .md-code-block-actions {
1416
+ opacity: 1;
1417
+ }
1418
+ }
1419
+
1420
+ @media (forced-colors: active) {
1421
+ .md-code-block-copy,
1422
+ .md-code-block-copy-status:not(:empty) {
1423
+ background: ButtonFace;
1424
+ color: ButtonText;
1425
+ border-color: ButtonText;
1426
+ }
1427
+
1428
+ .md-code-block-copy:focus-visible {
1429
+ outline-color: Highlight;
1430
+ }
1431
+ }
1432
+
1257
1433
  .md-math-block {
1258
1434
  overflow-x: auto;
1259
1435
  }
@@ -1262,7 +1438,8 @@ pre.md-unhandled-scroll.md-code-block {
1262
1438
  margin: 0;
1263
1439
  }
1264
1440
 
1265
- .md-list li>.md-block {
1441
+ .md-list li>.md-block,
1442
+ .md-list li>.md-code-block-container>.md-code-block {
1266
1443
  margin: 0;
1267
1444
  }
1268
1445
 
@@ -1275,25 +1452,30 @@ pre.md-unhandled-scroll.md-code-block {
1275
1452
  position: relative;
1276
1453
  }
1277
1454
 
1455
+ .md-list > li {
1456
+ min-height: 1lh;
1457
+ position: relative;
1458
+ }
1459
+
1278
1460
  /*
1279
1461
  * The list marker is pulled into the gutter by markerKind (not `:first-child`),
1280
1462
  * because a nested item may carry its source indentation as a leading glue
1281
1463
  * before the marker. Gutter-positioning keeps the marker out of the inline
1282
1464
  * flow so toggling it never shifts the item's text horizontally.
1283
1465
  *
1284
- * Vertical centring makes the marker box exactly the item's first line box and
1285
- * centres the glyph in it. Getting that box right is the whole trick: an
1286
- * inherited UNITLESS line-height is re-resolved against the element's own
1287
- * font-size, so a marker shrunk by `--md-marker-font-scale` also gets a
1288
- * proportionally shorter line box which, pinned at `top: 0`, floats the glyph
1289
- * above the text. Dividing `1lh` by that same scale cancels the shrink exactly,
1290
- * without touching the painted size and without a `transform` (which would
1291
- * shrink the box the caret geometry is measured from).
1466
+ * The source box follows the first body line; the native reading marker is
1467
+ * never replaced or resized. Source symbols share the body's font baseline,
1468
+ * not a font-dependent optical centre of the painted asterisk.
1292
1469
  */
1293
1470
  .md-list-item-active>.md-marker-listItemMarker {
1294
1471
  position: absolute;
1295
1472
  right: 100%;
1296
1473
  top: 0;
1474
+ }
1475
+
1476
+ .md-list-item-active>.md-marker-listItemMarker,
1477
+ .md-list-item-active>.md-list-gutter>.md-marker-listItemMarker,
1478
+ .md-source-editing .md-list-gutter > .md-marker-listItemMarker {
1297
1479
  line-height: inherit;
1298
1480
  height: calc(1lh / var(--md-marker-font-scale));
1299
1481
  display: inline-flex;
@@ -1307,20 +1489,55 @@ pre.md-unhandled-scroll.md-code-block {
1307
1489
  * (`display: none`), so — exactly as for headings — re-hide the marker here for
1308
1490
  * the states that ask for it, otherwise the bullet could never be hidden.
1309
1491
  */
1310
- .md-list-item-active>.md-marker-listItemMarker.md-marker-hidden {
1492
+ .md-list-item-active>.md-marker-listItemMarker.md-marker-hidden,
1493
+ .md-list-item-active>.md-list-gutter>.md-marker-listItemMarker.md-marker-hidden {
1311
1494
  display: none;
1312
1495
  }
1313
1496
 
1497
+ /* An unfinished marker still uses the gutter of its completed "marker + space" prefix. */
1498
+ .md-list-item-incomplete > .md-marker-listItemMarker::after,
1499
+ .md-list-item-incomplete > .md-list-gutter > .md-marker-listItemMarker::after {
1500
+ content: ' ';
1501
+ white-space: pre;
1502
+ }
1503
+
1504
+ .md-list-item-incomplete .md-marker-listItemMarker > .md-list-item-line-anchor {
1505
+ font-size: calc(1em / var(--md-marker-font-scale));
1506
+ }
1507
+
1508
+ .md-marker-listItemMarker:has(> .md-list-marker-symbol) {
1509
+ font-family: inherit;
1510
+ --md-marker-font-scale: 1;
1511
+ }
1512
+
1513
+ .md-list-marker-symbol {
1514
+ display: inline-block;
1515
+ flex: 0 0 1em;
1516
+ width: 1em;
1517
+ text-align: center;
1518
+ }
1519
+
1520
+ .md-marker-listItemMarker:has(> .md-list-marker-symbol) > :is(.md-ws-space, .md-ws-tab) {
1521
+ font-family: var(--md-marker-font-family);
1522
+ word-spacing: calc(0.5em - 1ch + var(--md-list-marker-reserve) / var(--md-list-marker-spaces));
1523
+ tab-size: calc(0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces));
1524
+ }
1525
+
1526
+ .md-list-item-incomplete > .md-marker-listItemMarker:has(> .md-list-marker-symbol)::after,
1527
+ .md-list-item-incomplete > .md-list-gutter > .md-marker-listItemMarker:has(> .md-list-marker-symbol)::after {
1528
+ width: 0.5em;
1529
+ }
1530
+
1314
1531
  /*
1315
1532
  * An inactive ordered item uses the browser's native `::marker`. Match its
1316
1533
  * typography when revealing the source marker so switching the active item
1317
1534
  * does not change the number's width or horizontal position: an ordered marker
1318
1535
  * opts out of the muted size step entirely, which also makes the `1lh`
1319
- * compensation above a no-op for it. Keep unordered source markers in the
1320
- * standard muted monospace source style.
1536
+ * compensation above a no-op for it.
1321
1537
  */
1322
1538
  ol.md-list>.md-list-item-active>.md-marker-listItemMarker,
1323
- ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1539
+ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker,
1540
+ .md-source-editing ol.md-list > li > .md-list-gutter > .md-marker-listItemMarker {
1324
1541
  font-family: inherit;
1325
1542
  --md-marker-font-scale: 1;
1326
1543
  }
@@ -1353,23 +1570,40 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1353
1570
  justify-content: space-between;
1354
1571
  }
1355
1572
 
1573
+ .md-source-editing .md-list-gutter {
1574
+ top: 0;
1575
+ height: 1lh;
1576
+ align-items: center;
1577
+ }
1578
+
1579
+ .md-source-editing .md-list-gutter > .md-glue-indent {
1580
+ --md-source-indent-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em));
1581
+ --md-source-space-width: calc(var(--md-source-indent-width) / var(--md-indent-length));
1582
+ flex-basis: var(--md-source-indent-width);
1583
+ display: block;
1584
+ font-family: var(--md-marker-font-family);
1585
+ /* Stretch the source character itself so DOM ranges and selections fill the cell too. */
1586
+ word-spacing: calc(var(--md-source-space-width) - 1ch);
1587
+ tab-size: var(--md-source-space-width);
1588
+ }
1589
+
1590
+ .md-source-editing .md-list-gutter > .md-marker-listItemMarker.md-marker-hidden {
1591
+ display: inline-flex;
1592
+ visibility: hidden;
1593
+ }
1594
+
1356
1595
  .md-list-gutter>.md-marker-listItemMarker {
1357
1596
  flex: 0 0 auto;
1597
+ white-space: pre;
1358
1598
  }
1359
1599
 
1360
1600
  /*
1361
- * A NESTED item's bullet is a flex child of the gutter, so the direct-child
1362
- * rule above cannot reach it and it would otherwise stretch to the gutter's
1363
- * full height with its glyph parked at the top. Centring is therefore done by
1364
- * the gutter itself: it is statically positioned (hence aligned to the item's
1365
- * first line), so making it one line box tall and centring its children puts
1366
- * the bullet and the indentation dots on that line.
1601
+ * A nested item's gutter stays one body line tall. The marker has the same
1602
+ * compensated line box as a top-level marker, including when it hosts the
1603
+ * incomplete item's zero-source caret anchor.
1367
1604
  *
1368
- * The gutter carries body typography, so its `1lh` needs no compensation — and
1369
- * the bullet inside keeps its own muted `font-size`, which is exactly what the
1370
- * shrink-to-fit gutter reserves. Shrinking the bullet visually instead would
1371
- * make the gutter reserve more width than the bullet paints and slide the whole
1372
- * indentation column left.
1605
+ * The gutter and source symbol carry body typography, so their baselines stay
1606
+ * aligned without measuring fonts or changing native reading markers.
1373
1607
  */
1374
1608
  .md-list-item-active>.md-list-gutter {
1375
1609
  height: 1lh;
@@ -1398,6 +1632,10 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1398
1632
  display: none;
1399
1633
  }
1400
1634
 
1635
+ .md-source-editing .md-paragraph>.md-glue-indent.md-glue-hidden {
1636
+ display: inline;
1637
+ }
1638
+
1401
1639
  /*
1402
1640
  * A loose list item's later block (its second paragraph etc.) owns the source
1403
1641
  * continuation indent that precedes it as its `leadingTrivia`. Like a nested
@@ -1407,12 +1645,14 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1407
1645
  * active (the footprint is identical in both states, so the text never shifts).
1408
1646
  */
1409
1647
  .md-list li>.md-block,
1410
- .md-task-list-item>.md-block {
1648
+ .md-task-list-item>.md-block,
1649
+ .md-list li>.md-code-block-container>.md-code-block {
1411
1650
  position: relative;
1412
1651
  }
1413
1652
 
1414
1653
  .md-list li>.md-block>.md-glue-indent:first-child,
1415
- .md-task-list-item>.md-block>.md-glue-indent:first-child {
1654
+ .md-task-list-item>.md-block>.md-glue-indent:first-child,
1655
+ .md-list li>.md-code-block-container>.md-code-block>.md-glue-indent:first-child {
1416
1656
  position: absolute;
1417
1657
  right: 100%;
1418
1658
  top: 0;
@@ -1427,7 +1667,62 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1427
1667
  * block (loose task items) stay in lockstep — keeping every block's text in
1428
1668
  * one vertical column under the marker.
1429
1669
  */
1670
+ }
1671
+
1672
+ .md-list > li {
1430
1673
  --md-task-marker-width: 1.75em;
1674
+ --md-list-label-reserve: 0em;
1675
+ --md-list-marker-reserve: var(--md-list-label-reserve);
1676
+ --md-list-source-padding: 0em;
1677
+ }
1678
+
1679
+ .md-list > .md-list-item-active {
1680
+ --md-list-source-padding: calc((var(--md-list-marker-spaces) - 1) * 0.5em);
1681
+ }
1682
+
1683
+ .md-list > .md-task-list-item {
1684
+ --md-list-marker-reserve: 0em;
1685
+ }
1686
+
1687
+ .md-source-editing .md-list-with-task-items > li:not(.md-empty-block) {
1688
+ --md-list-label-reserve: 0.5em;
1689
+ }
1690
+
1691
+ .md-source-editing .md-list > li > .md-paragraph {
1692
+ padding-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1693
+ }
1694
+
1695
+ .md-source-editing .md-list > li > .md-list-item-line-anchor {
1696
+ margin-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1697
+ }
1698
+
1699
+ .md-source-editing .md-list > li > .md-marker-listItemMarker {
1700
+ right: calc(100% - (var(--md-list-label-reserve) + var(--md-list-source-padding)) / var(--md-marker-font-scale));
1701
+ }
1702
+
1703
+ .md-source-editing .md-list-gutter {
1704
+ right: calc(100% - var(--md-list-label-reserve) - var(--md-list-source-padding));
1705
+ }
1706
+
1707
+ .md-source-editing .md-marker-listItemMarker {
1708
+ word-spacing: calc(var(--md-list-marker-reserve) / var(--md-marker-font-scale) / var(--md-list-marker-spaces));
1709
+ }
1710
+
1711
+ /* Keep the mandatory separator's native width; each extra source space adds a body-sized half-em cell. */
1712
+ .md-source-editing .md-marker-listItemMarker > :is(.md-ws-space, .md-ws-tab) ~ :is(.md-ws-space, .md-ws-tab) {
1713
+ font-family: var(--md-marker-font-family);
1714
+ word-spacing: calc((0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces)) / var(--md-marker-font-scale) - 1ch);
1715
+ tab-size: calc((0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces)) / var(--md-marker-font-scale));
1716
+ }
1717
+
1718
+ .md-source-editing .md-task-separator {
1719
+ position: absolute;
1720
+ left: calc(var(--md-list-source-padding) - 1em + 1.5ch * var(--md-marker-font-scale));
1721
+ top: 0;
1722
+ font-family: var(--md-marker-font-family);
1723
+ white-space: pre;
1724
+ word-spacing: calc((1.5em - 1.5ch * var(--md-marker-font-scale)) / var(--md-separator-length) - 1ch);
1725
+ tab-size: calc((1.5em - 1.5ch * var(--md-marker-font-scale)) / var(--md-separator-length));
1431
1726
  }
1432
1727
 
1433
1728
  /*
@@ -1441,7 +1736,7 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1441
1736
  padding-left: var(--md-task-marker-width);
1442
1737
  }
1443
1738
 
1444
- .md-task-list-item>.md-paragraph>.md-glue:first-child {
1739
+ .md-task-list-item>.md-paragraph>.md-glue-taskListCheck {
1445
1740
  position: absolute;
1446
1741
  top: 0;
1447
1742
  left: 0;
@@ -1457,6 +1752,39 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1457
1752
  padding-left: var(--md-task-marker-width);
1458
1753
  }
1459
1754
 
1755
+ .md-source-editing .md-task-list-item > .md-list-gutter {
1756
+ right: calc(100% - var(--md-list-source-padding));
1757
+ }
1758
+
1759
+ .md-source-editing .md-task-list-item > .md-list-gutter::after {
1760
+ content: '';
1761
+ font-family: var(--md-marker-font-family);
1762
+ font-size: calc(1em * var(--md-marker-font-scale));
1763
+ flex: 0 0 calc(1em / var(--md-marker-font-scale) + 1.5ch);
1764
+ }
1765
+
1766
+ .md-source-editing .md-task-list-item > .md-paragraph > .md-glue-taskListCheck {
1767
+ font-family: var(--md-marker-font-family);
1768
+ font-size: calc(1em * var(--md-marker-font-scale));
1769
+ left: calc((var(--md-list-source-padding) - 1em) / var(--md-marker-font-scale) - 1.5ch);
1770
+ width: 3ch;
1771
+ }
1772
+
1773
+ .md-source-editing .md-task-list-item > .md-block + .md-block:not(.md-list) {
1774
+ padding-left: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
1775
+ }
1776
+
1777
+ .md-source-editing .md-task-list-item > .md-list {
1778
+ padding-left: var(--md-list-indent-step, 2em);
1779
+ }
1780
+
1781
+ .md-source-editing .md-checkbox {
1782
+ font-family: var(--md-marker-font-family);
1783
+ font-size: calc(1em * var(--md-marker-font-scale));
1784
+ left: calc((var(--md-list-source-padding) - 1em) / var(--md-marker-font-scale) - 8px);
1785
+ top: calc((1lh / var(--md-marker-font-scale) - 16px) / 2);
1786
+ }
1787
+
1460
1788
  .md-checkbox {
1461
1789
  /* The rendered task-list widget — editor chrome, not markdown typography. */
1462
1790
  appearance: none;
@@ -1635,7 +1963,7 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1635
1963
  right: var(--md-readonly-toggle-inset);
1636
1964
  pointer-events: auto;
1637
1965
  display: inline-grid;
1638
- grid-template-columns: repeat(2, 24px);
1966
+ grid-template-columns: repeat(3, 24px);
1639
1967
  align-items: center;
1640
1968
  justify-items: center;
1641
1969
  gap: 2px;
@@ -1801,7 +2129,8 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1801
2129
  opacity: 1;
1802
2130
  }
1803
2131
 
1804
- .md-readonly-toggle:not(.md-readonly-toggle-locked) .md-readonly-toggle-icon-editing,
2132
+ .md-readonly-toggle:not(.md-readonly-toggle-locked):not(.md-readonly-toggle-source) .md-readonly-toggle-icon-editing,
2133
+ .md-readonly-toggle.md-readonly-toggle-source .md-readonly-toggle-icon-source,
1805
2134
  .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
1806
2135
  color: HighlightText;
1807
2136
  }
@@ -27,6 +27,10 @@
27
27
  margin: 0.5em 0;
28
28
  }
29
29
 
30
+ .md-theme-default .md-code-block-container {
31
+ margin: 0.5em 0;
32
+ }
33
+
30
34
  .md-theme-default .md-code-block {
31
35
  background: #f4f4f4;
32
36
  border-radius: 4px;
@@ -34,6 +38,10 @@
34
38
  margin: 0.5em 0;
35
39
  }
36
40
 
41
+ .md-theme-default .md-code-block-container > .md-code-block {
42
+ margin: 0;
43
+ }
44
+
37
45
  .md-theme-default .md-code-block code {
38
46
  font-family: 'Cascadia Code', 'Fira Code', monospace;
39
47
  font-size: 14px;
@@ -112,6 +112,11 @@
112
112
  }
113
113
 
114
114
  /* Fenced code block. */
115
+ .github-markdown-theme .md-code-block-container {
116
+ margin-top: 0;
117
+ margin-bottom: 16px;
118
+ }
119
+
115
120
  .github-markdown-theme .md-code-block {
116
121
  margin-top: 0;
117
122
  margin-bottom: 16px;
@@ -122,6 +127,10 @@
122
127
  border-radius: 6px;
123
128
  }
124
129
 
130
+ .github-markdown-theme .md-code-block-container > .md-code-block {
131
+ margin: 0;
132
+ }
133
+
125
134
  .github-markdown-theme .md-code-block code {
126
135
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
127
136
  'Liberation Mono', monospace;
@@ -209,6 +209,11 @@
209
209
  }
210
210
 
211
211
  /* Fenced code block: framed by a 1px border, preview-style. */
212
+ .md-theme-vscode-default .md-code-block-container {
213
+ margin-top: 0;
214
+ margin-bottom: 16px;
215
+ }
216
+
212
217
  .md-theme-vscode-default .md-code-block {
213
218
  margin-top: 0;
214
219
  margin-bottom: 16px;
@@ -219,6 +224,10 @@
219
224
  border-radius: 3px;
220
225
  }
221
226
 
227
+ .md-theme-vscode-default .md-code-block-container > .md-code-block {
228
+ margin: 0;
229
+ }
230
+
222
231
  .md-theme-vscode-default .md-code-block code {
223
232
  font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
224
233
  'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
@@ -205,6 +205,11 @@
205
205
  }
206
206
 
207
207
  /* Fenced code block. */
208
+ .md-theme-vscode-github .md-code-block-container {
209
+ margin-top: 0;
210
+ margin-bottom: 16px;
211
+ }
212
+
208
213
  .md-theme-vscode-github .md-code-block {
209
214
  margin-top: 0;
210
215
  margin-bottom: 16px;
@@ -215,6 +220,10 @@
215
220
  border-radius: 6px;
216
221
  }
217
222
 
223
+ .md-theme-vscode-github .md-code-block-container > .md-code-block {
224
+ margin: 0;
225
+ }
226
+
218
227
  .md-theme-vscode-github .md-code-block code {
219
228
  font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
220
229
  'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);