@memorysmithapp/markdown-renderer 0.3.1 → 0.4.0

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 (56) hide show
  1. package/README.md +32 -4
  2. package/dist/Markdown.d.ts +6 -2
  3. package/dist/Markdown.js +126 -17
  4. package/dist/NoteActions.d.ts +9 -0
  5. package/dist/NoteActions.js +68 -0
  6. package/dist/NoteBody.d.ts +23 -2
  7. package/dist/NoteBody.js +73 -7
  8. package/dist/edit/AttachDialog.d.ts +21 -0
  9. package/dist/edit/AttachDialog.js +126 -0
  10. package/dist/edit/ContextMenu.d.ts +29 -0
  11. package/dist/edit/ContextMenu.js +95 -0
  12. package/dist/edit/LanguageControl.d.ts +19 -0
  13. package/dist/edit/LanguageControl.js +124 -0
  14. package/dist/edit/NoteEditor.d.ts +43 -0
  15. package/dist/edit/NoteEditor.js +461 -0
  16. package/dist/edit/analyze.d.ts +150 -0
  17. package/dist/edit/analyze.js +268 -0
  18. package/dist/edit/blocks.d.ts +96 -0
  19. package/dist/edit/blocks.js +480 -0
  20. package/dist/edit/commands.d.ts +78 -0
  21. package/dist/edit/commands.js +257 -0
  22. package/dist/edit/frontmatter.d.ts +45 -0
  23. package/dist/edit/frontmatter.js +142 -0
  24. package/dist/edit/index.d.ts +4 -0
  25. package/dist/edit/index.js +6 -0
  26. package/dist/edit/live.d.ts +28 -0
  27. package/dist/edit/live.js +675 -0
  28. package/dist/edit/saves.d.ts +18 -0
  29. package/dist/edit/saves.js +52 -0
  30. package/dist/edit/table.d.ts +58 -0
  31. package/dist/edit/table.js +185 -0
  32. package/dist/file-types.d.ts +30 -0
  33. package/dist/file-types.js +70 -0
  34. package/dist/highlight.d.ts +21 -7
  35. package/dist/highlight.js +56 -7
  36. package/dist/host.d.ts +60 -3
  37. package/dist/host.js +8 -0
  38. package/dist/index.d.ts +4 -4
  39. package/dist/mode-icons.d.ts +6 -0
  40. package/dist/mode-icons.js +11 -0
  41. package/dist/prism-grammars.d.ts +18 -0
  42. package/dist/prism-grammars.js +305 -0
  43. package/dist/remark-callouts.d.ts +6 -0
  44. package/dist/remark-callouts.js +2 -2
  45. package/dist/remark-ring.d.ts +5 -0
  46. package/dist/remark-ring.js +25 -15
  47. package/dist/slots.js +17 -1
  48. package/dist/strings.d.ts +127 -1
  49. package/dist/strings.js +126 -1
  50. package/dist/task-saves.d.ts +35 -0
  51. package/dist/task-saves.js +86 -0
  52. package/dist/theme.d.ts +49 -0
  53. package/dist/theme.js +3 -2
  54. package/package.json +14 -2
  55. package/structure.css +331 -0
  56. package/theme-default.css +1084 -0
package/theme-default.css CHANGED
@@ -61,6 +61,11 @@
61
61
  --ms-callout-stop: var(--markdown-callout-stop, 180, 35, 24);
62
62
  --ms-callout-aside: var(--markdown-callout-aside, 109, 40, 217);
63
63
  --ms-callout-quote: var(--markdown-callout-quote, 84, 93, 115);
64
+ /* A link in a callout title is underlined: the title is in the callout's
65
+ colour and weight, and the blue family's colour is the accent's, so a link
66
+ there would read as more of the title. */
67
+ --ms-callout-title-link-decoration: var(--markdown-callout-title-link-decoration, underline 1px);
68
+ --ms-callout-title-link-offset: var(--markdown-callout-title-link-offset, 0.15em);
64
69
  --ms-font-sans: var(--markdown-font-sans, 'Inter', 'Segoe UI', system-ui, sans-serif);
65
70
  --ms-font-display: var(--markdown-font-display, 'Space Grotesk', 'Segoe UI', system-ui, sans-serif);
66
71
  --ms-font-mono: var(--markdown-font-mono, ui-monospace, 'Cascadia Code', Consolas, monospace);
@@ -132,6 +137,7 @@
132
137
  are the Lucide set the reference theme draws with; a theme names its own
133
138
  per family, as the icon properties, or draws them as elements. */
134
139
  --ms-icon-pencil: var(--markdown-icon-note, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"));
140
+ --ms-icon-chevron: var(--markdown-icon-chevron, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"));
135
141
  --ms-icon-info: var(--markdown-icon-info, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E"));
136
142
  --ms-icon-clipboard: var(--markdown-icon-summary, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M8 11h8'/%3E%3Cpath d='M8 16h6'/%3E%3C/svg%3E"));
137
143
  --ms-icon-flame: var(--markdown-icon-tip, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.07-2.14-.22-4.05 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.15.43-2.29 1-3a2.5 2.5 0 0 0 2.5 2.5Z'/%3E%3C/svg%3E"));
@@ -583,6 +589,51 @@
583
589
  font-weight: 600;
584
590
  line-height: var(--ms-line-height-tight);
585
591
  }
592
+ /* A callout marked + or - folds (#83): its title is the control, with a
593
+ chevron at its end that turns as it opens; closed, the title alone shows. */
594
+ .markdown details.callout > summary.callout-title {
595
+ list-style: none;
596
+ cursor: pointer;
597
+ }
598
+ .markdown details.callout > summary.callout-title::-webkit-details-marker {
599
+ display: none;
600
+ }
601
+ .markdown details.callout > summary.callout-title::after {
602
+ content: '';
603
+ flex: 0 0 auto;
604
+ align-self: center;
605
+ width: 1em;
606
+ height: 1em;
607
+ margin-inline-start: auto;
608
+ background-color: currentcolor;
609
+ -webkit-mask: var(--ms-icon-chevron) center / contain no-repeat;
610
+ mask: var(--ms-icon-chevron) center / contain no-repeat;
611
+ transform: rotate(-90deg);
612
+ transition: transform 160ms ease;
613
+ }
614
+ .markdown details.callout[open] > summary.callout-title::after {
615
+ transform: none;
616
+ }
617
+ .markdown details.callout:not([open]) > summary.callout-title {
618
+ margin-bottom: 0;
619
+ }
620
+ .markdown details.callout > summary.callout-title:focus-visible {
621
+ outline: 2px solid rgb(var(--callout-color));
622
+ outline-offset: 2px;
623
+ border-radius: 4px;
624
+ }
625
+ @media (prefers-reduced-motion: reduce) {
626
+ .markdown details.callout > summary.callout-title::after {
627
+ transition: none;
628
+ }
629
+ }
630
+ /* A link in the title is marked by more than its colour, which may be the
631
+ title's own; a pending link keeps its dashed rule, and a footnote's number
632
+ its own look. */
633
+ .markdown .callout-title :is(a, .wikilink):not(.wikilink-pending, [data-footnote-ref]) {
634
+ text-decoration: var(--ms-callout-title-link-decoration);
635
+ text-underline-offset: var(--ms-callout-title-link-offset);
636
+ }
586
637
  .markdown .callout-title::before {
587
638
  content: '';
588
639
  flex: 0 0 auto;
@@ -826,6 +877,61 @@
826
877
  border-bottom: 1px dashed var(--ms-text-soft);
827
878
  cursor: help;
828
879
  }
880
+ /* A file the notebook keeps, drawn by its type as MemorySmith draws it
881
+ (observed at 4b67c7e, #77): what a browser draws is drawn — an image, a
882
+ player — and everything else, the PDF included, is a card with what it is
883
+ and the ways out of the page. */
884
+ .markdown .attachment-image {
885
+ display: block;
886
+ max-width: 100%;
887
+ height: auto;
888
+ margin-block: var(--ms-p-spacing);
889
+ border-radius: 8px;
890
+ }
891
+ .markdown .attachment-player {
892
+ display: block;
893
+ width: 100%;
894
+ margin-block: var(--ms-p-spacing);
895
+ }
896
+ .markdown .attachment-card {
897
+ display: flex;
898
+ align-items: center;
899
+ justify-content: space-between;
900
+ flex-wrap: wrap;
901
+ gap: 0.75rem;
902
+ margin-block: var(--ms-p-spacing);
903
+ padding: 0.75rem 0.9rem;
904
+ border: 1px solid var(--ms-border);
905
+ border-inline-start: 2px solid var(--ms-accent);
906
+ border-radius: 8px;
907
+ }
908
+ .markdown .attachment-card-body {
909
+ display: flex;
910
+ flex-direction: column;
911
+ gap: 0.15rem;
912
+ min-width: 0;
913
+ }
914
+ .markdown .attachment-card-name {
915
+ font-family: var(--ms-font-display);
916
+ font-weight: 600;
917
+ overflow-wrap: anywhere;
918
+ }
919
+ .markdown .attachment-card-note {
920
+ font-size: 0.8rem;
921
+ color: var(--ms-text-soft);
922
+ overflow-wrap: anywhere;
923
+ }
924
+ .markdown .attachment-card-actions {
925
+ display: flex;
926
+ gap: 0.75rem;
927
+ flex-shrink: 0;
928
+ }
929
+ .markdown .attachment-card-actions a {
930
+ font-size: 0.85rem;
931
+ }
932
+ .markdown .attachment-loading {
933
+ color: var(--ms-text-soft);
934
+ }
829
935
  /* An address this surface does not follow. The text is the author's and stays
830
936
  exactly as they wrote it; what it loses is the affordance. The dotted rule
831
937
  is the only sign, and the title says why. */
@@ -938,6 +1044,70 @@
938
1044
  cursor: pointer;
939
1045
  }
940
1046
 
1047
+ /* The lock over an item whose tick is being saved: the item dimmed under a
1048
+ sweep of the accent, and "Updating…" in a pill at its right, breathing. */
1049
+ .markdown .task-lock {
1050
+ border-radius: 4px;
1051
+ background-color: color-mix(in srgb, var(--ms-bg) 55%, transparent);
1052
+ background-image: linear-gradient(
1053
+ 90deg,
1054
+ transparent 0%,
1055
+ color-mix(in srgb, var(--ms-accent) 14%, transparent) 50%,
1056
+ transparent 100%
1057
+ );
1058
+ background-size: 200% 100%;
1059
+ animation: markdown-task-sweep 1.2s linear infinite;
1060
+ }
1061
+ .markdown .task-lock-label,
1062
+ .markdown .task-notice {
1063
+ padding: 0.05rem 0.55rem;
1064
+ border-radius: 999px;
1065
+ font-size: 0.8rem;
1066
+ line-height: 1.5;
1067
+ white-space: nowrap;
1068
+ }
1069
+ .markdown .task-lock-label {
1070
+ border: 1px solid color-mix(in srgb, var(--ms-accent) 45%, transparent);
1071
+ background: var(--ms-surface);
1072
+ color: var(--ms-accent);
1073
+ animation: markdown-task-breathe 1.2s ease-in-out infinite;
1074
+ }
1075
+ /* A save that failed: the box is back, and this says so, then fades. */
1076
+ .markdown .task-notice {
1077
+ border: 1px solid rgba(var(--ms-callout-stop), 0.45);
1078
+ background: var(--ms-surface);
1079
+ color: rgb(var(--ms-callout-stop));
1080
+ animation: markdown-task-fade 2.5s ease-in forwards;
1081
+ }
1082
+ @keyframes markdown-task-sweep {
1083
+ from {
1084
+ background-position: 100% 0;
1085
+ }
1086
+ to {
1087
+ background-position: -100% 0;
1088
+ }
1089
+ }
1090
+ @keyframes markdown-task-breathe {
1091
+ 50% {
1092
+ opacity: 0.55;
1093
+ }
1094
+ }
1095
+ @keyframes markdown-task-fade {
1096
+ 0%,
1097
+ 70% {
1098
+ opacity: 1;
1099
+ }
1100
+ 100% {
1101
+ opacity: 0;
1102
+ }
1103
+ }
1104
+ @media (prefers-reduced-motion: reduce) {
1105
+ .markdown .task-lock,
1106
+ .markdown .task-lock-label {
1107
+ animation: none;
1108
+ }
1109
+ }
1110
+
941
1111
  /* ── Skeletons ──────────────────────────────────────────────────────────────
942
1112
  The shape of an embed that is coming, in the position it will occupy. */
943
1113
  .markdown .skeleton {
@@ -1000,3 +1170,917 @@
1000
1170
  background-image: none;
1001
1171
  }
1002
1172
  }
1173
+
1174
+ /* ── Edit mode ──────────────────────────────────────────────────────────────
1175
+ The note edited on the page that draws it: the same faces, sizes and
1176
+ colours as reading, with the notation the author is in shown dimmed, the
1177
+ blocks drawn as on the page, and the editor's own controls kept small and
1178
+ neutral so they never read as content. */
1179
+ .markdown .note-corner {
1180
+ margin: 0 0 0.5rem 1rem;
1181
+ }
1182
+ .markdown .mode-switch,
1183
+ .markdown .note-action {
1184
+ padding: 0.3rem 0.7rem;
1185
+ border: 1px solid var(--ms-border);
1186
+ border-radius: var(--ms-radius);
1187
+ background: var(--ms-surface);
1188
+ color: var(--ms-text);
1189
+ font-family: var(--ms-font-display);
1190
+ font-size: 0.85rem;
1191
+ font-weight: 500;
1192
+ line-height: 1.2;
1193
+ cursor: pointer;
1194
+ }
1195
+ .markdown .mode-switch.mode-switch-icon,
1196
+ .markdown .note-action {
1197
+ padding: 0.3rem 0.4rem;
1198
+ }
1199
+ .markdown .note-action {
1200
+ color: var(--ms-text-soft);
1201
+ }
1202
+ .markdown .note-action[data-copied='copied'] {
1203
+ color: var(--ms-accent);
1204
+ }
1205
+ .markdown .mode-switch-glyph {
1206
+ width: 1.1em;
1207
+ height: 1.1em;
1208
+ }
1209
+ .markdown .mode-switch:hover,
1210
+ .markdown .note-action:hover {
1211
+ border-color: var(--ms-accent);
1212
+ color: var(--ms-accent);
1213
+ }
1214
+ .markdown .mode-switch:focus-visible,
1215
+ .markdown .note-action:focus-visible,
1216
+ .markdown .edit-control:focus-visible,
1217
+ .markdown .edit-field:focus-visible {
1218
+ outline: 2px solid var(--ms-accent);
1219
+ outline-offset: 2px;
1220
+ }
1221
+ .markdown .edit-bar {
1222
+ margin: 0 0 1rem;
1223
+ background: var(--ms-bg);
1224
+ }
1225
+ /* The toolbar grows out of the switch, leftwards and down, and shrinks back
1226
+ into it when the note goes back to reading: its clip starts and ends on
1227
+ the corner that holds the switch, which the editor measures. */
1228
+ .markdown .edit-toolbar {
1229
+ padding: 0.35rem 0.4rem 0.35rem 0.15rem;
1230
+ border: 1px solid var(--ms-border);
1231
+ border-radius: var(--ms-radius);
1232
+ background: var(--ms-surface);
1233
+ animation: markdown-toolbar-grow 340ms cubic-bezier(0.4, 0, 0.2, 1);
1234
+ }
1235
+ .markdown .edit-bar[data-leaving] .edit-toolbar {
1236
+ animation: markdown-toolbar-shrink 260ms cubic-bezier(0.4, 0, 1, 1) forwards;
1237
+ }
1238
+ @keyframes markdown-toolbar-grow {
1239
+ from {
1240
+ clip-path: inset(0 0 calc(100% - var(--edit-corner-height, 100%)) calc(100% - var(--edit-corner-width, 100%)) round var(--ms-radius));
1241
+ }
1242
+ to {
1243
+ clip-path: inset(0 0 0 0 round var(--ms-radius));
1244
+ }
1245
+ }
1246
+ @keyframes markdown-toolbar-shrink {
1247
+ from {
1248
+ clip-path: inset(0 0 0 0 round var(--ms-radius));
1249
+ }
1250
+ to {
1251
+ clip-path: inset(0 0 calc(100% - var(--edit-corner-height, 100%)) calc(100% - var(--edit-corner-width, 100%)) round var(--ms-radius));
1252
+ }
1253
+ }
1254
+ @media (prefers-reduced-motion: reduce) {
1255
+ .markdown .edit-toolbar,
1256
+ .markdown .edit-bar[data-leaving] .edit-toolbar {
1257
+ animation: none;
1258
+ }
1259
+ }
1260
+ /* In the toolbar the group is its end, as tall as its other controls. */
1261
+ .markdown .edit-corner .note-corner {
1262
+ margin: 0;
1263
+ }
1264
+ .markdown .edit-corner .mode-switch,
1265
+ .markdown .edit-corner .note-action {
1266
+ height: 1.9rem;
1267
+ }
1268
+ @media (max-width: 560px) {
1269
+ .markdown .edit-corner {
1270
+ padding-bottom: 0.25rem;
1271
+ border-bottom: 1px solid var(--ms-border);
1272
+ }
1273
+ }
1274
+
1275
+ /* Where the save of the last change stands, before the switch: an icon for
1276
+ each state, the loader turning while the save is in flight. */
1277
+ .markdown .edit-save {
1278
+ padding: 0 0.35rem;
1279
+ color: var(--ms-text-soft);
1280
+ font-family: var(--ms-font-display);
1281
+ font-size: 0.78rem;
1282
+ line-height: 1.3;
1283
+ }
1284
+ .markdown .edit-save-icon {
1285
+ width: 1.25rem;
1286
+ height: 1.9rem;
1287
+ }
1288
+ .markdown .edit-save-icon > svg {
1289
+ width: 1rem;
1290
+ height: 1rem;
1291
+ }
1292
+ .markdown .edit-save[data-save='saving'] {
1293
+ color: var(--ms-accent);
1294
+ }
1295
+ .markdown .edit-save[data-save='saving'] .edit-save-icon > svg {
1296
+ animation: markdown-save-turn 0.9s linear infinite;
1297
+ }
1298
+ .markdown .edit-save[data-save='failed'] {
1299
+ color: rgb(var(--ms-callout-stop));
1300
+ }
1301
+ /* Asked to leave while the last save failed: the corner shakes once. */
1302
+ .markdown .edit-corner[data-blocked] {
1303
+ animation: markdown-corner-refuse 360ms ease-in-out;
1304
+ }
1305
+ @keyframes markdown-corner-refuse {
1306
+ 20%,
1307
+ 60% {
1308
+ transform: translateX(-3px);
1309
+ }
1310
+ 40%,
1311
+ 80% {
1312
+ transform: translateX(3px);
1313
+ }
1314
+ }
1315
+ /* The attach button while the host keeps a file, and when it could not. */
1316
+ .markdown .edit-control[data-attach='busy'] {
1317
+ color: var(--ms-accent);
1318
+ }
1319
+ .markdown .edit-control[data-attach='busy'] > svg {
1320
+ animation: markdown-save-turn 0.9s linear infinite;
1321
+ }
1322
+ .markdown .edit-control[data-attach='failed'] {
1323
+ color: rgb(var(--ms-callout-stop));
1324
+ }
1325
+ @media (prefers-reduced-motion: reduce) {
1326
+ .markdown .edit-control[data-attach='busy'] > svg {
1327
+ animation: none;
1328
+ }
1329
+ }
1330
+ @keyframes markdown-save-turn {
1331
+ to {
1332
+ transform: rotate(360deg);
1333
+ }
1334
+ }
1335
+ .markdown .edit-save-retry {
1336
+ padding: 0;
1337
+ border: 0;
1338
+ border-radius: calc(var(--ms-radius) - 2px);
1339
+ background: none;
1340
+ color: inherit;
1341
+ cursor: pointer;
1342
+ }
1343
+ .markdown .edit-save-retry:hover {
1344
+ background: var(--ms-code-bg);
1345
+ }
1346
+ .markdown .edit-save-retry:focus-visible {
1347
+ outline: 2px solid var(--ms-accent);
1348
+ outline-offset: 2px;
1349
+ }
1350
+ @media (prefers-reduced-motion: reduce) {
1351
+ .markdown .edit-save[data-save='saving'] .edit-save-icon > svg,
1352
+ .markdown .edit-corner[data-blocked] {
1353
+ animation: none;
1354
+ }
1355
+ }
1356
+
1357
+ /* A code block's language (#84): a quiet label until it is pointed at. */
1358
+ .markdown .edit-language-button {
1359
+ padding: 0.1rem 0.4rem;
1360
+ border: 1px solid transparent;
1361
+ border-radius: calc(var(--ms-radius) - 2px);
1362
+ background: none;
1363
+ color: var(--ms-text-soft);
1364
+ font-family: var(--ms-font-sans);
1365
+ font-size: 0.75rem;
1366
+ line-height: 1.4;
1367
+ cursor: pointer;
1368
+ }
1369
+ .markdown .edit-language-button:hover,
1370
+ .markdown .edit-language-button[aria-expanded='true'] {
1371
+ border-color: var(--ms-border);
1372
+ background: var(--ms-surface);
1373
+ color: var(--ms-text);
1374
+ }
1375
+ .markdown .edit-language-button:focus-visible {
1376
+ outline: 2px solid var(--ms-accent);
1377
+ outline-offset: 1px;
1378
+ }
1379
+ .markdown .edit-language-caret > svg {
1380
+ width: 0.8em;
1381
+ height: 0.8em;
1382
+ }
1383
+ .markdown .edit-language-popover {
1384
+ padding: 0.3rem;
1385
+ border: 1px solid var(--ms-border);
1386
+ border-radius: var(--ms-radius);
1387
+ background: var(--ms-surface);
1388
+ box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
1389
+ font-family: var(--ms-font-sans);
1390
+ font-size: 0.85rem;
1391
+ }
1392
+ .markdown .edit-language-search {
1393
+ margin-bottom: 0.3rem;
1394
+ padding: 0.35rem 0.5rem;
1395
+ border: 1px solid var(--ms-border);
1396
+ border-radius: calc(var(--ms-radius) - 2px);
1397
+ background: var(--ms-bg);
1398
+ color: var(--ms-text);
1399
+ font: inherit;
1400
+ }
1401
+ .markdown .edit-language-search:focus-visible {
1402
+ outline: 2px solid var(--ms-accent);
1403
+ outline-offset: 0;
1404
+ }
1405
+ .markdown .edit-language-option {
1406
+ padding: 0.3rem 0.5rem;
1407
+ border-radius: calc(var(--ms-radius) - 2px);
1408
+ color: var(--ms-text);
1409
+ cursor: pointer;
1410
+ }
1411
+ .markdown .edit-language-option[data-active] {
1412
+ background: var(--ms-code-bg);
1413
+ }
1414
+ .markdown .edit-language-option[aria-selected='true'] {
1415
+ font-weight: 600;
1416
+ }
1417
+ .markdown .edit-language-hint,
1418
+ .markdown .edit-language-none {
1419
+ color: var(--ms-text-soft);
1420
+ font-size: 0.78rem;
1421
+ }
1422
+ .markdown .edit-language-none {
1423
+ padding: 0.3rem 0.5rem;
1424
+ }
1425
+
1426
+ /* The editing menu (#81): small and neutral, as the toolbar's controls. */
1427
+ .markdown .edit-menu {
1428
+ min-width: 15rem;
1429
+ padding: 0.3rem;
1430
+ border: 1px solid var(--ms-border);
1431
+ border-radius: var(--ms-radius);
1432
+ background: var(--ms-surface);
1433
+ color: var(--ms-text);
1434
+ box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
1435
+ font-family: var(--ms-font-sans);
1436
+ font-size: 0.85rem;
1437
+ }
1438
+ .markdown .edit-menu-separator {
1439
+ height: 1px;
1440
+ margin: 0.3rem 0.2rem;
1441
+ background: var(--ms-border);
1442
+ }
1443
+ .markdown .edit-menu-heading {
1444
+ padding: 0.25rem 0.55rem 0.15rem;
1445
+ color: var(--ms-text-soft);
1446
+ font-family: var(--ms-font-display);
1447
+ font-size: 0.72rem;
1448
+ font-weight: 600;
1449
+ letter-spacing: 0.04em;
1450
+ text-transform: uppercase;
1451
+ }
1452
+ .markdown .edit-menu-item {
1453
+ gap: 0.6rem;
1454
+ padding: 0.35rem 0.55rem;
1455
+ border: 0;
1456
+ border-radius: calc(var(--ms-radius) - 2px);
1457
+ background: none;
1458
+ color: inherit;
1459
+ font: inherit;
1460
+ cursor: pointer;
1461
+ }
1462
+ .markdown .edit-menu-item:hover,
1463
+ .markdown .edit-menu-item:focus-visible {
1464
+ background: var(--ms-code-bg);
1465
+ outline: none;
1466
+ }
1467
+ .markdown .edit-menu-item:focus-visible {
1468
+ box-shadow: inset 0 0 0 2px var(--ms-accent);
1469
+ }
1470
+ .markdown .edit-menu-item[aria-disabled='true'] {
1471
+ opacity: 0.45;
1472
+ cursor: default;
1473
+ }
1474
+ .markdown .edit-menu-icon {
1475
+ display: inline-flex;
1476
+ color: var(--ms-text-soft);
1477
+ }
1478
+ .markdown .edit-menu-shortcut {
1479
+ color: var(--ms-text-soft);
1480
+ font-size: 0.75rem;
1481
+ }
1482
+
1483
+ /* The attach dialog (#78), in the look of the dialog of the Markdown. */
1484
+ .markdown .edit-attach-ways {
1485
+ gap: 0.25rem;
1486
+ padding: 0 1rem;
1487
+ border-bottom: 1px solid var(--ms-border);
1488
+ }
1489
+ .markdown .edit-attach-way {
1490
+ margin-bottom: -1px;
1491
+ padding: 0.55rem 0.75rem;
1492
+ border: 0;
1493
+ border-bottom: 2px solid transparent;
1494
+ background: none;
1495
+ color: var(--ms-text-soft);
1496
+ font: inherit;
1497
+ font-family: var(--ms-font-display);
1498
+ font-size: 0.85rem;
1499
+ font-weight: 500;
1500
+ cursor: pointer;
1501
+ }
1502
+ .markdown .edit-attach-way[aria-selected='true'] {
1503
+ border-bottom-color: var(--ms-accent);
1504
+ color: var(--ms-text);
1505
+ }
1506
+ .markdown .edit-attach-panel {
1507
+ padding: 1rem;
1508
+ }
1509
+ .markdown .edit-attach-form,
1510
+ .markdown .edit-attach-files {
1511
+ gap: 0.75rem;
1512
+ }
1513
+ .markdown .edit-attach-form label {
1514
+ gap: 0.25rem;
1515
+ color: var(--ms-text-soft);
1516
+ font-size: 0.8rem;
1517
+ }
1518
+ .markdown .edit-attach-input {
1519
+ padding: 0.4rem 0.55rem;
1520
+ border: 1px solid var(--ms-border);
1521
+ border-radius: calc(var(--ms-radius) - 2px);
1522
+ background: var(--ms-bg);
1523
+ color: var(--ms-text);
1524
+ font: inherit;
1525
+ font-size: 0.9rem;
1526
+ }
1527
+ .markdown .edit-attach-input:focus-visible,
1528
+ .markdown .edit-attach-way:focus-visible,
1529
+ .markdown .edit-attach-item:focus-visible,
1530
+ .markdown .edit-attach-button:focus-visible {
1531
+ outline: 2px solid var(--ms-accent);
1532
+ outline-offset: 1px;
1533
+ }
1534
+ .markdown .edit-attach-input[aria-invalid='true'] {
1535
+ border-color: rgb(var(--ms-callout-stop));
1536
+ }
1537
+ .markdown .edit-attach-error {
1538
+ margin: 0;
1539
+ color: rgb(var(--ms-callout-stop));
1540
+ font-size: 0.8rem;
1541
+ }
1542
+ .markdown .edit-attach-button {
1543
+ display: inline-flex;
1544
+ align-items: center;
1545
+ align-self: flex-start;
1546
+ gap: 0.4rem;
1547
+ padding: 0.45rem 0.8rem;
1548
+ border: 1px solid var(--ms-border);
1549
+ border-radius: var(--ms-radius);
1550
+ background: var(--ms-surface);
1551
+ color: var(--ms-text);
1552
+ font: inherit;
1553
+ font-family: var(--ms-font-display);
1554
+ font-size: 0.85rem;
1555
+ font-weight: 500;
1556
+ cursor: pointer;
1557
+ }
1558
+ .markdown .edit-attach-primary {
1559
+ border-color: var(--ms-accent);
1560
+ background: var(--ms-accent);
1561
+ color: #fff;
1562
+ }
1563
+ .markdown .edit-attach-button:disabled {
1564
+ opacity: 0.45;
1565
+ cursor: default;
1566
+ }
1567
+ .markdown .edit-attach-file {
1568
+ gap: 0.5rem 0.75rem;
1569
+ margin: 0;
1570
+ padding: 0.6rem 0.75rem 0.75rem;
1571
+ border: 1px solid var(--ms-border);
1572
+ border-radius: var(--ms-radius);
1573
+ }
1574
+ .markdown .edit-attach-file-kind {
1575
+ padding: 0 0.25rem;
1576
+ color: var(--ms-text-soft);
1577
+ font-size: 0.78rem;
1578
+ }
1579
+ .markdown .edit-attach-list {
1580
+ display: flex;
1581
+ flex-direction: column;
1582
+ gap: 0.25rem;
1583
+ }
1584
+ .markdown .edit-attach-item {
1585
+ gap: 0.75rem;
1586
+ padding: 0.45rem 0.55rem;
1587
+ border: 1px solid transparent;
1588
+ border-radius: var(--ms-radius);
1589
+ background: none;
1590
+ color: var(--ms-text);
1591
+ font: inherit;
1592
+ cursor: pointer;
1593
+ }
1594
+ .markdown .edit-attach-item:hover {
1595
+ border-color: var(--ms-border);
1596
+ background: var(--ms-code-bg);
1597
+ }
1598
+ .markdown .edit-attach-preview {
1599
+ width: 3rem;
1600
+ height: 2.25rem;
1601
+ border-radius: 6px;
1602
+ background: var(--ms-code-bg);
1603
+ color: var(--ms-text-soft);
1604
+ }
1605
+ .markdown .edit-attach-item-name {
1606
+ font-family: var(--ms-font-display);
1607
+ font-weight: 600;
1608
+ overflow-wrap: anywhere;
1609
+ }
1610
+ .markdown .edit-attach-item-note,
1611
+ .markdown .edit-attach-note {
1612
+ color: var(--ms-text-soft);
1613
+ font-size: 0.8rem;
1614
+ overflow-wrap: anywhere;
1615
+ }
1616
+ .markdown .edit-attach-note {
1617
+ margin: 0;
1618
+ }
1619
+
1620
+ /* The note's Markdown, over the page. */
1621
+ .markdown .edit-source {
1622
+ border: 1px solid var(--ms-border);
1623
+ border-radius: var(--ms-radius);
1624
+ background: var(--ms-surface);
1625
+ color: var(--ms-text);
1626
+ box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25);
1627
+ }
1628
+ .markdown .edit-source::backdrop {
1629
+ background: rgba(0, 0, 0, 0.35);
1630
+ }
1631
+ .markdown .edit-source-header {
1632
+ padding: 0.6rem 0.75rem 0.6rem 1rem;
1633
+ border-bottom: 1px solid var(--ms-border);
1634
+ }
1635
+ .markdown .edit-source-title {
1636
+ font-family: var(--ms-font-display);
1637
+ font-size: 1rem;
1638
+ font-weight: 600;
1639
+ }
1640
+ .markdown .edit-source-copied {
1641
+ color: var(--ms-text-soft);
1642
+ font-size: 0.8rem;
1643
+ }
1644
+ .markdown .edit-source-text {
1645
+ padding: 1rem;
1646
+ background: var(--ms-code-bg);
1647
+ font-family: var(--ms-font-mono);
1648
+ font-size: 0.85rem;
1649
+ line-height: 1.55;
1650
+ }
1651
+ /* Every group draws its separator on its left edge and overlaps the group
1652
+ before it by that rule's width; the tools clip their own left edge, so the
1653
+ separator of a group that starts a row — the first one's too — is cut away
1654
+ and every row starts at the same place, with no script (#80). */
1655
+ .markdown .edit-toolbar-tools {
1656
+ column-gap: 0;
1657
+ clip-path: inset(-0.5rem -0.5rem -0.5rem 0);
1658
+ }
1659
+ .markdown .edit-toolbar-group {
1660
+ margin-inline-start: -1px;
1661
+ padding-inline: 0.25rem;
1662
+ border-inline-start: 1px solid var(--ms-border);
1663
+ }
1664
+ .markdown .edit-control {
1665
+ min-width: 1.9rem;
1666
+ height: 1.9rem;
1667
+ padding: 0 0.35rem;
1668
+ border: 1px solid transparent;
1669
+ border-radius: calc(var(--ms-radius) - 2px);
1670
+ background: none;
1671
+ color: var(--ms-text-soft);
1672
+ font: inherit;
1673
+ font-size: 0.85rem;
1674
+ cursor: pointer;
1675
+ }
1676
+ .markdown .edit-control:hover:not(:disabled),
1677
+ .markdown .edit-control[aria-pressed='true'] {
1678
+ background: var(--ms-code-bg);
1679
+ color: var(--ms-text);
1680
+ }
1681
+ .markdown .edit-control:disabled {
1682
+ opacity: 0.45;
1683
+ cursor: default;
1684
+ }
1685
+ .markdown .edit-control-labelled {
1686
+ gap: 0.35rem;
1687
+ }
1688
+ .markdown .edit-toolbar select,
1689
+ .markdown .edit-block-controls select {
1690
+ height: 1.9rem;
1691
+ padding: 0 0.3rem;
1692
+ border: 1px solid var(--ms-border);
1693
+ border-radius: calc(var(--ms-radius) - 2px);
1694
+ background: var(--ms-surface);
1695
+ color: var(--ms-text);
1696
+ font: inherit;
1697
+ font-size: 0.8rem;
1698
+ }
1699
+ .markdown .edit-unavailable {
1700
+ margin: 0 0 1rem;
1701
+ color: var(--ms-text-soft);
1702
+ font-size: 0.85rem;
1703
+ }
1704
+
1705
+ /* The text: the line height of a run, and the caret in the accent. */
1706
+ .markdown .markdown-editor .cm-content {
1707
+ padding: 0;
1708
+ font-family: var(--ms-font-sans);
1709
+ line-height: var(--ms-line-height-normal);
1710
+ caret-color: var(--ms-accent);
1711
+ }
1712
+ .markdown .markdown-editor .cm-line {
1713
+ padding: 0;
1714
+ }
1715
+ .markdown .markdown-editor .cm-cursor {
1716
+ border-left-color: var(--ms-accent);
1717
+ }
1718
+ .markdown .markdown-editor .cm-selectionBackground,
1719
+ .markdown .markdown-editor .cm-focused .cm-selectionBackground {
1720
+ background: color-mix(in srgb, var(--ms-accent) 22%, transparent);
1721
+ }
1722
+ .markdown .cm-ms-syntax {
1723
+ color: var(--ms-text-soft);
1724
+ opacity: 0.75;
1725
+ font-weight: normal;
1726
+ font-style: normal;
1727
+ }
1728
+ .markdown .cm-ms-heading {
1729
+ font-family: var(--ms-font-heading);
1730
+ font-weight: var(--ms-heading-weight);
1731
+ color: var(--ms-heading-color);
1732
+ line-height: var(--ms-line-height-tight);
1733
+ padding-top: 0.6em;
1734
+ }
1735
+ .markdown .cm-ms-h1 {
1736
+ font-size: var(--ms-h1-size);
1737
+ font-weight: var(--ms-h1-weight);
1738
+ }
1739
+ .markdown .cm-ms-h2 {
1740
+ font-size: var(--ms-h2-size);
1741
+ }
1742
+ .markdown .cm-ms-h3 {
1743
+ font-size: var(--ms-h3-size);
1744
+ }
1745
+ .markdown .cm-ms-h4 {
1746
+ font-size: var(--ms-h4-size);
1747
+ }
1748
+ .markdown .cm-ms-h5 {
1749
+ font-size: var(--ms-h5-size);
1750
+ }
1751
+ .markdown .cm-ms-h6 {
1752
+ font-size: var(--ms-h6-size);
1753
+ color: var(--ms-h6-color);
1754
+ }
1755
+ .markdown .cm-ms-strong {
1756
+ font-weight: 700;
1757
+ }
1758
+ .markdown .cm-ms-em {
1759
+ font-style: italic;
1760
+ }
1761
+ .markdown .cm-ms-strike {
1762
+ text-decoration: line-through;
1763
+ }
1764
+ .markdown .cm-ms-highlight {
1765
+ /* What the page draws for marked text: the browser's own <mark>. */
1766
+ background: mark;
1767
+ color: marktext;
1768
+ }
1769
+ .markdown .cm-ms-code {
1770
+ font-family: var(--ms-font-mono);
1771
+ font-size: 0.875em;
1772
+ color: var(--ms-code-color);
1773
+ background: var(--ms-inline-code-bg);
1774
+ }
1775
+ .markdown .cm-ms-link,
1776
+ .markdown .cm-ms-wikilink {
1777
+ color: var(--ms-accent);
1778
+ cursor: text;
1779
+ }
1780
+ .markdown .cm-ms-wikilink {
1781
+ font-weight: 600;
1782
+ }
1783
+ .markdown .cm-ms-wikilink.cm-ms-pending {
1784
+ color: var(--ms-pending);
1785
+ border-bottom: 1px dashed var(--ms-pending);
1786
+ }
1787
+ .markdown .cm-ms-bullet {
1788
+ display: inline-block;
1789
+ width: 1em;
1790
+ color: var(--ms-text-soft);
1791
+ }
1792
+ .markdown .cm-ms-list-marker {
1793
+ color: var(--ms-text-soft);
1794
+ }
1795
+ .markdown .cm-ms-task {
1796
+ margin: 0 0.45em 0 0;
1797
+ vertical-align: middle;
1798
+ accent-color: var(--ms-accent);
1799
+ cursor: pointer;
1800
+ }
1801
+ .markdown .cm-ms-task-done {
1802
+ color: var(--ms-text-soft);
1803
+ }
1804
+ .markdown .cm-ms-quote {
1805
+ padding-inline-start: 1.5em !important;
1806
+ border-inline-start: var(--ms-quote-border-width) solid var(--ms-quote-border-color);
1807
+ color: var(--ms-quote-color);
1808
+ }
1809
+ .markdown .cm-ms-quote-2 {
1810
+ box-shadow: inset calc(var(--ms-quote-border-width) + 0.6em) 0 0 -0.6em var(--ms-quote-border-color);
1811
+ }
1812
+ .markdown .cm-ms-code-line,
1813
+ .markdown .cm-ms-yaml,
1814
+ .markdown .cm-ms-table-source,
1815
+ .markdown .cm-ms-callout-source {
1816
+ font-family: var(--ms-font-mono);
1817
+ font-size: 0.875em;
1818
+ background: var(--ms-code-bg);
1819
+ padding: 0 1rem !important;
1820
+ }
1821
+ .markdown .cm-ms-code-line {
1822
+ border-inline: 1px solid var(--ms-code-border);
1823
+ }
1824
+ .markdown .cm-ms-code-first {
1825
+ border-top: 1px solid var(--ms-code-border);
1826
+ border-start-start-radius: var(--ms-radius);
1827
+ border-start-end-radius: var(--ms-radius);
1828
+ padding-top: 0.5rem !important;
1829
+ }
1830
+ .markdown .cm-ms-code-last {
1831
+ border-bottom: 1px solid var(--ms-code-border);
1832
+ border-end-start-radius: var(--ms-radius);
1833
+ border-end-end-radius: var(--ms-radius);
1834
+ padding-bottom: 0.5rem !important;
1835
+ }
1836
+ .markdown .cm-ms-callout-source {
1837
+ border-inline-start: 3px solid color-mix(in srgb, var(--ms-accent) 60%, transparent);
1838
+ }
1839
+ .markdown .cm-ms-math-source {
1840
+ font-family: var(--ms-font-mono);
1841
+ font-size: 0.875em;
1842
+ }
1843
+ .markdown .cm-ms-math-block {
1844
+ padding: 0.5rem 0;
1845
+ text-align: center;
1846
+ cursor: text;
1847
+ }
1848
+ .markdown .cm-ms-rule hr {
1849
+ margin: 0.75rem 0;
1850
+ border: 0;
1851
+ border-top: 1px solid var(--ms-border);
1852
+ }
1853
+ .markdown .cm-ms-footnote-ref {
1854
+ vertical-align: super;
1855
+ font-size: 0.75em;
1856
+ color: var(--ms-accent);
1857
+ }
1858
+ .markdown .cm-ms-footnote-def {
1859
+ color: var(--ms-text-soft);
1860
+ font-size: 0.9em;
1861
+ }
1862
+ /* A comment is not on the page, so in edit mode it reads as a margin note. */
1863
+ .markdown .cm-ms-comment {
1864
+ color: var(--ms-text-soft);
1865
+ font-style: italic;
1866
+ background: color-mix(in srgb, var(--ms-text-soft) 12%, transparent);
1867
+ border-radius: 2px;
1868
+ }
1869
+ .markdown .cm-ms-block-id {
1870
+ color: var(--ms-text-soft);
1871
+ font-family: var(--ms-font-mono);
1872
+ font-size: 0.75em;
1873
+ }
1874
+ .markdown .cm-ms-raw {
1875
+ font-family: var(--ms-font-mono);
1876
+ font-size: 0.875em;
1877
+ color: var(--ms-text-soft);
1878
+ }
1879
+
1880
+ /* A drawn block answers the pointer by showing it can be opened as source;
1881
+ its controls appear when it is pointed at or holds the focus. */
1882
+ .markdown .cm-ms-block {
1883
+ border-radius: var(--ms-radius);
1884
+ cursor: text;
1885
+ }
1886
+ .markdown .cm-ms-block:hover {
1887
+ box-shadow: 0 0 0 1px var(--ms-border);
1888
+ }
1889
+ .markdown .edit-block-controls {
1890
+ opacity: 0;
1891
+ padding: 0.1rem;
1892
+ border: 1px solid var(--ms-border);
1893
+ border-radius: var(--ms-radius);
1894
+ background: var(--ms-surface);
1895
+ transition: opacity 0.12s;
1896
+ }
1897
+ .markdown .cm-ms-block:hover .edit-block-controls,
1898
+ .markdown .edit-block:focus-within .edit-block-controls {
1899
+ opacity: 1;
1900
+ }
1901
+ .markdown .edit-table table {
1902
+ width: 100%;
1903
+ }
1904
+ .markdown .edit-cell {
1905
+ outline: none;
1906
+ }
1907
+ .markdown .edit-cell-drawn {
1908
+ cursor: text;
1909
+ }
1910
+ .markdown .edit-cell-drawn .markdown,
1911
+ .markdown .edit-cell-drawn p {
1912
+ display: inline;
1913
+ margin: 0;
1914
+ }
1915
+ .markdown .edit-cell:focus {
1916
+ box-shadow: 0 0 0 2px var(--ms-accent);
1917
+ border-radius: 2px;
1918
+ }
1919
+
1920
+ /* The properties as a form: the fields look like the values they hold until
1921
+ they are pointed at, so the form reads as the page. */
1922
+ .markdown .edit-properties {
1923
+ padding-top: 0.25rem;
1924
+ }
1925
+ .markdown .edit-field {
1926
+ width: 100%;
1927
+ min-width: 0;
1928
+ padding: 0.05rem 0.3rem;
1929
+ border: 1px solid transparent;
1930
+ border-radius: calc(var(--ms-radius) - 3px);
1931
+ background: none;
1932
+ color: inherit;
1933
+ font: inherit;
1934
+ }
1935
+ .markdown .edit-field:hover,
1936
+ .markdown .edit-field:focus {
1937
+ border-color: var(--ms-border);
1938
+ background: var(--ms-surface);
1939
+ }
1940
+ .markdown .edit-field::placeholder {
1941
+ color: var(--ms-pending);
1942
+ }
1943
+ .markdown .edit-title {
1944
+ display: block;
1945
+ margin: 0 0 0.6rem;
1946
+ padding: 0;
1947
+ font-family: var(--ms-title-font);
1948
+ font-size: var(--ms-title-size);
1949
+ font-weight: var(--ms-title-weight);
1950
+ line-height: var(--ms-line-height-tight);
1951
+ color: var(--ms-title-color);
1952
+ }
1953
+ .markdown .edit-key {
1954
+ width: auto;
1955
+ color: var(--ms-properties-key-color);
1956
+ }
1957
+ .markdown .edit-field[type='date'] {
1958
+ width: auto;
1959
+ }
1960
+ .markdown .edit-property .metadata-property-value {
1961
+ display: flex;
1962
+ align-items: center;
1963
+ gap: 0.25rem;
1964
+ }
1965
+ .markdown .edit-property .edit-control {
1966
+ min-width: 1.5rem;
1967
+ height: 1.5rem;
1968
+ opacity: 0;
1969
+ }
1970
+ /* A property's remove button, before its name, shows always (#73). */
1971
+ .markdown .edit-property .metadata-property-key .edit-control {
1972
+ opacity: 1;
1973
+ }
1974
+ .markdown .edit-key-spacer {
1975
+ flex: none;
1976
+ visibility: hidden;
1977
+ }
1978
+ /* A property's controls show on hover or focus; the row that adds one and a
1979
+ list's button for its next item show always. */
1980
+ .markdown .edit-property:hover .edit-control,
1981
+ .markdown .edit-property:focus-within .edit-control,
1982
+ .markdown .edit-property-new .edit-control,
1983
+ .markdown .edit-property .edit-list .edit-control {
1984
+ opacity: 1;
1985
+ }
1986
+ /* The key holds the property: the choice of its type, laid over the icon of
1987
+ its type and opening there, its name, and the button that removes it. */
1988
+ .markdown .edit-property .metadata-property-key {
1989
+ position: relative;
1990
+ align-items: center;
1991
+ }
1992
+ .markdown .edit-type {
1993
+ position: absolute;
1994
+ left: -0.25em;
1995
+ top: 50%;
1996
+ /* From before the icon to just past the chevron, short of the remove button. */
1997
+ width: calc(1.95em + 0.15rem + 2px);
1998
+ height: 1.6em;
1999
+ margin: 0;
2000
+ padding: 0;
2001
+ transform: translateY(-50%);
2002
+ -webkit-appearance: none;
2003
+ appearance: none;
2004
+ border: 1px solid transparent;
2005
+ border-radius: 4px;
2006
+ background: transparent;
2007
+ color: transparent;
2008
+ font: inherit;
2009
+ cursor: pointer;
2010
+ }
2011
+ .markdown .edit-type:hover {
2012
+ border-color: var(--ms-border);
2013
+ }
2014
+ .markdown .edit-type:focus-visible {
2015
+ outline: 2px solid var(--ms-accent);
2016
+ outline-offset: 1px;
2017
+ }
2018
+ .markdown .edit-type-caret {
2019
+ display: inline-flex;
2020
+ flex: none;
2021
+ margin-inline-start: -0.25rem;
2022
+ pointer-events: none;
2023
+ }
2024
+ .markdown .edit-type-caret > svg {
2025
+ width: 0.75em;
2026
+ height: 0.75em;
2027
+ }
2028
+ .markdown .edit-type option {
2029
+ background: var(--ms-surface);
2030
+ color: var(--ms-text);
2031
+ }
2032
+ .markdown .edit-list {
2033
+ align-items: center;
2034
+ flex: 1 1 auto;
2035
+ }
2036
+ .markdown .edit-list-add {
2037
+ width: 6rem;
2038
+ flex: 0 1 8rem;
2039
+ min-width: 4rem;
2040
+ }
2041
+ .markdown .edit-chip-remove {
2042
+ margin-inline-start: 0.3rem;
2043
+ padding: 0;
2044
+ border: 0;
2045
+ background: none;
2046
+ color: inherit;
2047
+ font: inherit;
2048
+ cursor: pointer;
2049
+ opacity: 0.6;
2050
+ }
2051
+ .markdown .edit-chip-remove:hover {
2052
+ opacity: 1;
2053
+ }
2054
+ .markdown .edit-boolean {
2055
+ margin: 0 0 0 -0.3rem;
2056
+ padding: 0.05rem 0.3rem;
2057
+ border: 1px solid transparent;
2058
+ border-radius: var(--ms-radius);
2059
+ background: transparent;
2060
+ color: inherit;
2061
+ font: inherit;
2062
+ cursor: pointer;
2063
+ }
2064
+ .markdown .edit-boolean:hover {
2065
+ border-color: var(--ms-border);
2066
+ }
2067
+ .markdown .edit-add-properties {
2068
+ margin: 0 0 0.75rem;
2069
+ }
2070
+
2071
+ /* What the editor suggests after `[[`: a list on the surface. */
2072
+ .markdown .cm-tooltip-autocomplete {
2073
+ border: 1px solid var(--ms-border);
2074
+ border-radius: var(--ms-radius);
2075
+ background: var(--ms-surface);
2076
+ color: var(--ms-text);
2077
+ font-family: var(--ms-font-sans);
2078
+ font-size: 0.875rem;
2079
+ }
2080
+ .markdown .cm-tooltip-autocomplete > ul {
2081
+ font-family: var(--ms-font-sans);
2082
+ }
2083
+ .markdown .cm-tooltip-autocomplete li[aria-selected] {
2084
+ background: color-mix(in srgb, var(--ms-accent) 18%, transparent);
2085
+ color: var(--ms-text);
2086
+ }