@vscode/markdown-editor 0.0.2-113 → 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.
- package/README.md +425 -0
- package/dist/commands.js +1 -1
- package/dist/commands.js.map +1 -1
- package/dist/index.d.ts +264 -30
- package/dist/index.js +2837 -2128
- package/dist/index.js.map +1 -1
- package/package.json +16 -7
- package/src/contrib/rename/rename.css +73 -0
- package/src/contrib/suggest/suggest.css +109 -0
- package/src/view/editor.css +279 -40
package/src/view/editor.css
CHANGED
|
@@ -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:
|
|
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`)
|
|
993
|
-
*
|
|
994
|
-
*
|
|
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
|
|
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;
|
|
@@ -1363,25 +1452,30 @@ pre.md-unhandled-scroll.md-code-block {
|
|
|
1363
1452
|
position: relative;
|
|
1364
1453
|
}
|
|
1365
1454
|
|
|
1455
|
+
.md-list > li {
|
|
1456
|
+
min-height: 1lh;
|
|
1457
|
+
position: relative;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1366
1460
|
/*
|
|
1367
1461
|
* The list marker is pulled into the gutter by markerKind (not `:first-child`),
|
|
1368
1462
|
* because a nested item may carry its source indentation as a leading glue
|
|
1369
1463
|
* before the marker. Gutter-positioning keeps the marker out of the inline
|
|
1370
1464
|
* flow so toggling it never shifts the item's text horizontally.
|
|
1371
1465
|
*
|
|
1372
|
-
*
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1375
|
-
* font-size, so a marker shrunk by `--md-marker-font-scale` also gets a
|
|
1376
|
-
* proportionally shorter line box which, pinned at `top: 0`, floats the glyph
|
|
1377
|
-
* above the text. Dividing `1lh` by that same scale cancels the shrink exactly,
|
|
1378
|
-
* without touching the painted size and without a `transform` (which would
|
|
1379
|
-
* 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.
|
|
1380
1469
|
*/
|
|
1381
1470
|
.md-list-item-active>.md-marker-listItemMarker {
|
|
1382
1471
|
position: absolute;
|
|
1383
1472
|
right: 100%;
|
|
1384
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 {
|
|
1385
1479
|
line-height: inherit;
|
|
1386
1480
|
height: calc(1lh / var(--md-marker-font-scale));
|
|
1387
1481
|
display: inline-flex;
|
|
@@ -1395,20 +1489,55 @@ pre.md-unhandled-scroll.md-code-block {
|
|
|
1395
1489
|
* (`display: none`), so — exactly as for headings — re-hide the marker here for
|
|
1396
1490
|
* the states that ask for it, otherwise the bullet could never be hidden.
|
|
1397
1491
|
*/
|
|
1398
|
-
.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 {
|
|
1399
1494
|
display: none;
|
|
1400
1495
|
}
|
|
1401
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
|
+
|
|
1402
1531
|
/*
|
|
1403
1532
|
* An inactive ordered item uses the browser's native `::marker`. Match its
|
|
1404
1533
|
* typography when revealing the source marker so switching the active item
|
|
1405
1534
|
* does not change the number's width or horizontal position: an ordered marker
|
|
1406
1535
|
* opts out of the muted size step entirely, which also makes the `1lh`
|
|
1407
|
-
* compensation above a no-op for it.
|
|
1408
|
-
* standard muted monospace source style.
|
|
1536
|
+
* compensation above a no-op for it.
|
|
1409
1537
|
*/
|
|
1410
1538
|
ol.md-list>.md-list-item-active>.md-marker-listItemMarker,
|
|
1411
|
-
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 {
|
|
1412
1541
|
font-family: inherit;
|
|
1413
1542
|
--md-marker-font-scale: 1;
|
|
1414
1543
|
}
|
|
@@ -1441,23 +1570,40 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
|
|
|
1441
1570
|
justify-content: space-between;
|
|
1442
1571
|
}
|
|
1443
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
|
+
|
|
1444
1595
|
.md-list-gutter>.md-marker-listItemMarker {
|
|
1445
1596
|
flex: 0 0 auto;
|
|
1597
|
+
white-space: pre;
|
|
1446
1598
|
}
|
|
1447
1599
|
|
|
1448
1600
|
/*
|
|
1449
|
-
* A
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
* the gutter itself: it is statically positioned (hence aligned to the item's
|
|
1453
|
-
* first line), so making it one line box tall and centring its children puts
|
|
1454
|
-
* 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.
|
|
1455
1604
|
*
|
|
1456
|
-
* The gutter
|
|
1457
|
-
*
|
|
1458
|
-
* shrink-to-fit gutter reserves. Shrinking the bullet visually instead would
|
|
1459
|
-
* make the gutter reserve more width than the bullet paints and slide the whole
|
|
1460
|
-
* 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.
|
|
1461
1607
|
*/
|
|
1462
1608
|
.md-list-item-active>.md-list-gutter {
|
|
1463
1609
|
height: 1lh;
|
|
@@ -1486,6 +1632,10 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
|
|
|
1486
1632
|
display: none;
|
|
1487
1633
|
}
|
|
1488
1634
|
|
|
1635
|
+
.md-source-editing .md-paragraph>.md-glue-indent.md-glue-hidden {
|
|
1636
|
+
display: inline;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1489
1639
|
/*
|
|
1490
1640
|
* A loose list item's later block (its second paragraph etc.) owns the source
|
|
1491
1641
|
* continuation indent that precedes it as its `leadingTrivia`. Like a nested
|
|
@@ -1517,7 +1667,62 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
|
|
|
1517
1667
|
* block (loose task items) stay in lockstep — keeping every block's text in
|
|
1518
1668
|
* one vertical column under the marker.
|
|
1519
1669
|
*/
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
.md-list > li {
|
|
1520
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));
|
|
1521
1726
|
}
|
|
1522
1727
|
|
|
1523
1728
|
/*
|
|
@@ -1531,7 +1736,7 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
|
|
|
1531
1736
|
padding-left: var(--md-task-marker-width);
|
|
1532
1737
|
}
|
|
1533
1738
|
|
|
1534
|
-
.md-task-list-item>.md-paragraph>.md-glue
|
|
1739
|
+
.md-task-list-item>.md-paragraph>.md-glue-taskListCheck {
|
|
1535
1740
|
position: absolute;
|
|
1536
1741
|
top: 0;
|
|
1537
1742
|
left: 0;
|
|
@@ -1547,6 +1752,39 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
|
|
|
1547
1752
|
padding-left: var(--md-task-marker-width);
|
|
1548
1753
|
}
|
|
1549
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
|
+
|
|
1550
1788
|
.md-checkbox {
|
|
1551
1789
|
/* The rendered task-list widget — editor chrome, not markdown typography. */
|
|
1552
1790
|
appearance: none;
|
|
@@ -1725,7 +1963,7 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
|
|
|
1725
1963
|
right: var(--md-readonly-toggle-inset);
|
|
1726
1964
|
pointer-events: auto;
|
|
1727
1965
|
display: inline-grid;
|
|
1728
|
-
grid-template-columns: repeat(
|
|
1966
|
+
grid-template-columns: repeat(3, 24px);
|
|
1729
1967
|
align-items: center;
|
|
1730
1968
|
justify-items: center;
|
|
1731
1969
|
gap: 2px;
|
|
@@ -1891,7 +2129,8 @@ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
|
|
|
1891
2129
|
opacity: 1;
|
|
1892
2130
|
}
|
|
1893
2131
|
|
|
1894
|
-
.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,
|
|
1895
2134
|
.md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
|
|
1896
2135
|
color: HighlightText;
|
|
1897
2136
|
}
|