@vscode/markdown-editor 0.0.2-3 → 0.0.2-31

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 (34) hide show
  1. package/dist/_observables/observableInternal/index.d.ts +1 -1
  2. package/dist/_observables/observableInternal/logging/consoleObservableLogger.d.ts +1 -1
  3. package/dist/_observables/observableInternal/logging/debugger/devToolsLogger.d.ts +1 -1
  4. package/dist/_observables/observableInternal/logging/logging.d.ts +1 -1
  5. package/dist/_observables/observableInternal/reactions/{autorun.d.ts → createEffect.d.ts} +11 -3
  6. package/dist/config-Dvgk17FF.js +282 -0
  7. package/dist/config-Dvgk17FF.js.map +1 -0
  8. package/dist/config.d.ts +10 -0
  9. package/dist/config.js +6 -0
  10. package/dist/config.js.map +1 -0
  11. package/dist/index.d.ts +1061 -54
  12. package/dist/index.js +4218 -1870
  13. package/dist/index.js.map +1 -1
  14. package/dist/markdown-editor.css +1 -0
  15. package/dist/observables.js +45 -43
  16. package/dist/observables.js.map +1 -1
  17. package/dist/{runOnChange-C00UIwqQ.js → runOnChange-e7FtCqOQ.js} +115 -111
  18. package/dist/runOnChange-e7FtCqOQ.js.map +1 -0
  19. package/dist/stringEdit-DzLs4E1d.js +177 -0
  20. package/dist/stringEdit-DzLs4E1d.js.map +1 -0
  21. package/dist/web-editors.d.ts +125 -0
  22. package/dist/web-editors.js +5169 -0
  23. package/dist/web-editors.js.map +1 -0
  24. package/package.json +46 -9
  25. package/src/contrib/comments/commentInput.css +150 -0
  26. package/src/contrib/comments/comments.css +129 -0
  27. package/src/contrib/commentsVscode/vscodeCommentWidgetV2.css +171 -0
  28. package/src/view/editor.css +493 -20
  29. package/src/view/themes/default.css +11 -3
  30. package/src/view/themes/github.css +12 -8
  31. package/src/view/themes/vscode-default.css +359 -0
  32. package/src/view/themes/vscode-github.css +356 -0
  33. package/dist/runOnChange-C00UIwqQ.js.map +0 -1
  34. /package/dist/_observables/observableInternal/reactions/{autorunImpl.d.ts → createEffectImpl.d.ts} +0 -0
@@ -0,0 +1,359 @@
1
+ /*
2
+ * VS Code markdown theme — default preview variant (`md-theme-vscode-default`).
3
+ *
4
+ * One of two `--vscode-*`-variable-driven themes. This variant mirrors VS
5
+ * Code's own markdown *preview* stylesheet
6
+ * (`markdown-language-features/media/markdown.css`): a 14px base with a 22px
7
+ * line box, headings underlined with a 1px rule, a 5px blockquote bar, and
8
+ * code blocks framed by a 1px border on the editor's code-block background.
9
+ * Its heading scale is moderately reduced to better fit narrower editor panes.
10
+ * The sibling `vscode-github.css` (`md-theme-vscode-github`) instead mirrors
11
+ * GitHub's layout (16px base, badge-style inline code, zebra tables).
12
+ *
13
+ * Both themes are *variable-driven*: every color is `var(--vscode-*, …)` so the
14
+ * editor adopts whatever VS Code color theme is active WITHOUT the editor
15
+ * knowing anything about VS Code. They share the same `--md-tok-*` token
16
+ * palette, so only layout/typography differs between the two.
17
+ *
18
+ * Apply it via the editor `classNames` option:
19
+ *
20
+ * new EditorView(model, { classNames: ['md-theme-vscode-default'] });
21
+ *
22
+ * In a real webview VS Code injects the `--vscode-*` custom properties onto the
23
+ * document root and sets a body theme class, so this theme just works. In the
24
+ * Component Explorer the same variables are supplied by a snapshot stylesheet
25
+ * scoped under a `.vscode-theme.<id>` wrapper (see `fixture/vscodeThemes`).
26
+ *
27
+ * Fallbacks: each `var()` carries a light-palette fallback so the theme stays
28
+ * legible even with no `--vscode-*` variables present at all. Every selector is
29
+ * scoped under the theme class, so importing this file never affects the global
30
+ * page or any editor that did not opt in.
31
+ */
32
+
33
+ .md-editor.md-theme-vscode-default {
34
+ font-family: var(--markdown-font-family, -apple-system, BlinkMacSystemFont,
35
+ 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif);
36
+ font-size: var(--markdown-font-size, 14px);
37
+ line-height: var(--markdown-line-height, 1.572);
38
+ color: var(--vscode-editor-foreground, #1f2328);
39
+ word-wrap: break-word;
40
+ /*
41
+ * Active-block highlight (defined theme-agnostically in editor.css) follows
42
+ * the VS Code surface color so it stays a subtle inset on both light and
43
+ * dark color themes instead of a fixed light-grey box.
44
+ */
45
+ --md-block-active-background: var(--vscode-editorWidget-background, #f8f8f8);
46
+ /*
47
+ * Cursor color: editor.css paints `.md-cursor` with `--md-cursor-background`
48
+ * (theme-agnostic, black fallback); map it to the VS Code cursor color so it
49
+ * stays visible on dark color themes.
50
+ */
51
+ --md-cursor-background: var(--vscode-editorCursor-foreground, #000);
52
+ --md-readonly-accent: var(--vscode-button-background, rgb(45, 92, 180));
53
+ --md-readonly-accent-foreground: var(--vscode-button-foreground, #fff);
54
+ --md-separator-color: color-mix(in srgb,
55
+ var(--vscode-textSeparator-foreground, #d1d9e0) 60%, transparent);
56
+ --md-inline-code-background: color-mix(in srgb,
57
+ var(--vscode-textPreformat-background, #818b981f) 60%, transparent);
58
+ }
59
+
60
+ .vscode-high-contrast .md-editor.md-theme-vscode-default,
61
+ .vscode-high-contrast-light .md-editor.md-theme-vscode-default {
62
+ --md-separator-color: var(--vscode-textSeparator-foreground, currentColor);
63
+ --md-inline-code-background: var(--vscode-textPreformat-background, #818b981f);
64
+ }
65
+
66
+ .md-theme-vscode-default .md-heading {
67
+ margin-top: 24px;
68
+ margin-bottom: 16px;
69
+ font-weight: 600;
70
+ line-height: 1.25;
71
+ }
72
+
73
+ .md-theme-vscode-default h1.md-heading {
74
+ font-size: 1.75em;
75
+ padding-bottom: 0.3em;
76
+ border-bottom: 1px solid var(--md-separator-color);
77
+ }
78
+
79
+ .md-theme-vscode-default h2.md-heading {
80
+ font-size: 1.4em;
81
+ padding-bottom: 0.3em;
82
+ border-bottom: 1px solid var(--md-separator-color);
83
+ }
84
+
85
+ .md-theme-vscode-default h3.md-heading {
86
+ font-size: 1.2em;
87
+ }
88
+
89
+ .md-theme-vscode-default h4.md-heading {
90
+ font-size: 1em;
91
+ }
92
+
93
+ .md-theme-vscode-default h5.md-heading {
94
+ font-size: 0.875em;
95
+ }
96
+
97
+ .md-theme-vscode-default h6.md-heading {
98
+ font-size: 0.85em;
99
+ }
100
+
101
+ .md-theme-vscode-default .md-paragraph {
102
+ margin-top: 0;
103
+ margin-bottom: 16px;
104
+ }
105
+
106
+ /*
107
+ * Preview blockquotes keep the normal foreground color (no dimming) and use a
108
+ * thick 5px rule with the VS Code blockquote surface tint.
109
+ */
110
+ .md-theme-vscode-default .md-blockquote {
111
+ margin: 0 0 16px 0;
112
+ padding: 0 16px 0 10px;
113
+ /*
114
+ * The left padding the `>` gutter hangs in (matches padding-left: 10px).
115
+ * Must be an absolute length, not `em`: the marker positions itself with
116
+ * this var inside its own (smaller) font context, so an `em` value would
117
+ * resolve against the marker's font-size and pull the `>` out of alignment.
118
+ */
119
+ --md-blockquote-pad: 10px;
120
+ background-color: var(--vscode-textBlockQuote-background, transparent);
121
+ border-left: 5px solid var(--vscode-textBlockQuote-border, #d1d9e0);
122
+ border-radius: 2px;
123
+ }
124
+
125
+ .md-theme-vscode-default .md-list {
126
+ margin-top: 0;
127
+ margin-bottom: 16px;
128
+ padding-left: 2em;
129
+ /* The per-level indentation step the list gutter fills (matches padding-left). */
130
+ --md-list-indent-step: 2em;
131
+ }
132
+
133
+ /* Preview renders thematic breaks as a thin 1px rule rather than a thick bar. */
134
+ .md-theme-vscode-default .md-thematic-break {
135
+ height: 0;
136
+ padding: 0;
137
+ margin: 24px 0;
138
+ border: 0;
139
+ border-bottom: 1px solid var(--md-separator-color);
140
+ }
141
+
142
+ .md-theme-vscode-default a {
143
+ color: var(--vscode-textLink-foreground, #0969da);
144
+ text-decoration: none;
145
+ }
146
+
147
+ .md-theme-vscode-default a:hover {
148
+ text-decoration: underline;
149
+ }
150
+
151
+ .md-theme-vscode-default strong {
152
+ font-weight: 600;
153
+ }
154
+
155
+ /*
156
+ * Inline code. Preview keeps inline code at the body font size (1em) on a
157
+ * softened VS Code preformat surface, with only a small inset — no GitHub-style
158
+ * badge.
159
+ */
160
+ .md-theme-vscode-default :not(pre)>code {
161
+ font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
162
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
163
+ font-size: 1em;
164
+ line-height: 1.357em;
165
+ padding: 1px 3px;
166
+ margin: 0;
167
+ color: var(--vscode-textPreformat-foreground, inherit);
168
+ background-color: var(--md-inline-code-background);
169
+ border-radius: 4px;
170
+ white-space: break-spaces;
171
+ }
172
+
173
+ /* Fenced code block: framed by a 1px border, preview-style. */
174
+ .md-theme-vscode-default .md-code-block {
175
+ margin-top: 0;
176
+ margin-bottom: 16px;
177
+ padding: 16px;
178
+ line-height: 1.357;
179
+ background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
180
+ border: 1px solid var(--vscode-widget-border, #d1d9e0);
181
+ border-radius: 3px;
182
+ }
183
+
184
+ .md-theme-vscode-default .md-code-block code {
185
+ font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
186
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
187
+ padding: 0;
188
+ background-color: transparent;
189
+ border-radius: 0;
190
+ }
191
+
192
+ /*
193
+ * Syntax-highlight token colors. Driven by `--md-tok-*` custom properties so
194
+ * the explorer (or any embedder) can supply a palette matched to the active
195
+ * color theme. Fallbacks are the VS Code light theme palette.
196
+ */
197
+ .md-theme-vscode-default .md-code-block .tok-keyword {
198
+ color: var(--md-tok-keyword, #0000ff);
199
+ }
200
+
201
+ .md-theme-vscode-default .md-code-block .tok-string {
202
+ color: var(--md-tok-string, #a31515);
203
+ }
204
+
205
+ .md-theme-vscode-default .md-code-block .tok-comment {
206
+ color: var(--md-tok-comment, #008000);
207
+ }
208
+
209
+ .md-theme-vscode-default .md-code-block .tok-number {
210
+ color: var(--md-tok-number, #098658);
211
+ }
212
+
213
+ .md-theme-vscode-default .md-code-block .tok-regexp {
214
+ color: var(--md-tok-regexp, #811f3f);
215
+ }
216
+
217
+ .md-theme-vscode-default .md-code-block .tok-type {
218
+ color: var(--md-tok-type, #267f99);
219
+ }
220
+
221
+ .md-theme-vscode-default .md-code-block .tok-annotation {
222
+ color: var(--md-tok-annotation, #267f99);
223
+ }
224
+
225
+ .md-theme-vscode-default .md-code-block .tok-tag {
226
+ color: var(--md-tok-tag, #800000);
227
+ }
228
+
229
+ .md-theme-vscode-default .md-code-block .tok-attribute {
230
+ color: var(--md-tok-attribute, #e50000);
231
+ }
232
+
233
+ .md-theme-vscode-default .md-code-block .tok-delimiter {
234
+ color: var(--md-tok-delimiter, inherit);
235
+ }
236
+
237
+ /*
238
+ * Display math has no container styling (KaTeX renders it inline-centered).
239
+ * Keep only the block spacing; horizontal scroll comes from the base sheet.
240
+ */
241
+ .md-theme-vscode-default .md-math-block {
242
+ margin-top: 0;
243
+ margin-bottom: 16px;
244
+ }
245
+
246
+ /*
247
+ * KaTeX renders inline math at 1.21em with its own (larger) line-height, which
248
+ * would inflate the surrounding line box. Collapse it so the rendered math fits
249
+ * the text line and the paragraph height stays identical active vs inactive.
250
+ */
251
+ .md-theme-vscode-default .md-inline-math .katex {
252
+ line-height: 1;
253
+ }
254
+
255
+ .md-theme-vscode-default .md-table-wrapper {
256
+ /* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
257
+ with siblings as before; the inner table has no margin of its own. */
258
+ margin-top: 0;
259
+ margin-bottom: 16px;
260
+ }
261
+
262
+ .md-theme-vscode-default .md-table {
263
+ border-collapse: collapse;
264
+ width: auto;
265
+ }
266
+
267
+ .md-theme-vscode-default .md-table th,
268
+ .md-theme-vscode-default .md-table td {
269
+ padding: 5px 10px;
270
+ border: 1px solid var(--vscode-editorWidget-border, #d1d9e0);
271
+ text-align: left;
272
+ }
273
+
274
+ /*
275
+ * The editor renders every cell as <td> in a flat <table> of <tr> (no
276
+ * <thead>/<tbody>/<th>). Row order is: header, delimiter row, body rows.
277
+ */
278
+ .md-theme-vscode-default .md-table tr:first-child td {
279
+ font-weight: 600;
280
+ padding-top: 10px;
281
+ padding-bottom: 10px;
282
+ }
283
+
284
+ /* Active: reclaim the header's extra spacing to host the delimiter row. */
285
+ .md-theme-vscode-default .md-table.md-block-active tr:first-child td {
286
+ padding-top: 2px;
287
+ padding-bottom: 2px;
288
+ }
289
+
290
+ .md-theme-vscode-default .md-table tr:nth-child(even):not(.md-table-delimiter-row) {
291
+ background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
292
+ }
293
+
294
+ /*
295
+ * The delimiter row (`| --- | --- |`) is editor source shown only while
296
+ * editing; render it borderless with no vertical padding so it occupies just
297
+ * the compact space reclaimed from the header.
298
+ */
299
+ .md-theme-vscode-default .md-table-delimiter-row td {
300
+ border: 0;
301
+ padding: 0 10px;
302
+ background: transparent;
303
+ }
304
+
305
+ /*
306
+ * Active table: the source `|` pipes ARE the outline. Drop the HTML cell
307
+ * borders (kept as transparent so the 1px box geometry — and thus the table's
308
+ * height and first-text X — is unchanged) and clear the zebra fill so the
309
+ * table reads as plain source.
310
+ */
311
+ .md-theme-vscode-default .md-table.md-block-active td {
312
+ border-color: transparent;
313
+ }
314
+
315
+ .md-theme-vscode-default .md-table.md-block-active tr:nth-child(even):not(.md-table-delimiter-row) td {
316
+ background-color: transparent;
317
+ }
318
+
319
+ /*
320
+ * Shift each cell's leading pipe onto its left gridline (where the border was)
321
+ * and the last cell's closing pipe onto the right gridline. `position:
322
+ * relative` moves only the painted glyph by the cell's horizontal padding;
323
+ * siblings and the glue's reserved width are untouched, so active/inactive
324
+ * height and first-text X stay pixel-identical.
325
+ */
326
+ .md-theme-vscode-default .md-table.md-block-active td>.md-glue-tableCellGlue:first-child,
327
+ .md-theme-vscode-default .md-table.md-block-active .md-table-delimiter-row td>.md-marker-tableDelimiter {
328
+ position: relative;
329
+ left: -10px;
330
+ }
331
+
332
+ /*
333
+ * The last cell's closing `|` floats right after the (left-aligned) cell text.
334
+ * Pin it to the column's right gridline (the cell's border edge, 10px past the
335
+ * content box) so the right outline is a straight line. `top: auto` keeps the
336
+ * pipe on the content line (the shared editor.css rule takes it out of flow);
337
+ * the previous `top: 0` floated it to the cell's top edge, so on tall/wrapping
338
+ * rows it no longer lined up with the in-flow leading pipes.
339
+ */
340
+ .md-theme-vscode-default .md-table.md-block-active td:last-child {
341
+ position: relative;
342
+ }
343
+
344
+ .md-theme-vscode-default .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
345
+ position: absolute;
346
+ right: 0;
347
+ top: auto;
348
+ }
349
+
350
+ /*
351
+ * The delimiter row's last cell carries its closing `|` as a separate
352
+ * `tableDelimiterClose` marker; pin it to the same right gridline as the body
353
+ * rows' closing pipe so the last column's outline stays straight.
354
+ */
355
+ .md-theme-vscode-default .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
356
+ position: absolute;
357
+ right: 0;
358
+ top: auto;
359
+ }
@@ -0,0 +1,356 @@
1
+ /*
2
+ * VS Code markdown theme — GitHub layout variant (`md-theme-vscode-github`).
3
+ *
4
+ * One of two `--vscode-*`-variable-driven themes. This variant keeps the
5
+ * GitHub-style layout/typography (larger 16px base, 1.5 line-height, badge-
6
+ * style inline code, zebra tables); the sibling `vscode-default.css`
7
+ * (`md-theme-vscode-default`) mirrors VS Code's own markdown *preview*
8
+ * (`markdown-language-features/media/markdown.css`: 14px base, code blocks with
9
+ * a 1px border, 5px blockquote rule). Both consume the same `--vscode-*`
10
+ * variables and `--md-tok-*` token palette, so only layout/typography differs.
11
+ *
12
+ * A *variable-driven* theme: every color is expressed as `var(--vscode-*, …)`
13
+ * so the editor adopts whatever VS Code color theme is active (dark, light,
14
+ * high-contrast, or any custom theme) WITHOUT the editor knowing anything
15
+ * about VS Code. The editor only references variable NAMES — a documented
16
+ * contract — and bundles no VS Code CSS.
17
+ *
18
+ * Apply it via the editor `classNames` option:
19
+ *
20
+ * new EditorView(model, { classNames: ['md-theme-vscode-github'] });
21
+ *
22
+ * In a real webview VS Code injects the `--vscode-*` custom properties onto
23
+ * the document root and sets a body theme class, so this theme just works. In
24
+ * the Component Explorer the same variables are supplied by a snapshot
25
+ * stylesheet scoped under a `.vscode-theme.<id>` wrapper (see
26
+ * `fixture/vscodeThemes`). Either way the cascade reaches this theme's rules.
27
+ *
28
+ * Fallbacks: each `var()` carries a light-palette fallback so the theme stays
29
+ * legible even with no `--vscode-*` variables present at all.
30
+ *
31
+ * Layout/typography mirrors the GitHub theme (the basis of the production VS
32
+ * Code markdown editor); only the colors are swapped for variables. Every
33
+ * selector is scoped under the theme class, so importing this file never
34
+ * affects the global page or any editor that did not opt in.
35
+ *
36
+ * Syntax-token colors are exposed as `--md-tok-*` custom properties (with
37
+ * light-palette fallbacks). Real VS Code derives token colors from the live
38
+ * tokenizer's color map (baked in per token), NOT from `--vscode-*`; the
39
+ * Component Explorer supplies a matching `--md-tok-*` palette per color theme.
40
+ */
41
+
42
+ .md-editor.md-theme-vscode-github {
43
+ font-family: var(--markdown-font-family, -apple-system, BlinkMacSystemFont,
44
+ 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif);
45
+ font-size: var(--markdown-font-size, 16px);
46
+ line-height: var(--markdown-line-height, 1.5);
47
+ color: var(--vscode-editor-foreground, #1f2328);
48
+ word-wrap: break-word;
49
+ /*
50
+ * Active-block highlight (defined theme-agnostically in editor.css) follows
51
+ * the VS Code surface color so it stays a subtle inset on both light and
52
+ * dark color themes instead of a fixed light-grey box.
53
+ */
54
+ --md-block-active-background: var(--vscode-editorWidget-background, #f8f8f8);
55
+ /*
56
+ * Cursor color: editor.css paints `.md-cursor` with `--md-cursor-background`
57
+ * (theme-agnostic, black fallback); map it to the VS Code cursor color so it
58
+ * stays visible on dark color themes.
59
+ */
60
+ --md-cursor-background: var(--vscode-editorCursor-foreground, #000);
61
+ --md-readonly-accent: var(--vscode-button-background, rgb(45, 92, 180));
62
+ --md-readonly-accent-foreground: var(--vscode-button-foreground, #fff);
63
+ --md-inline-code-background: color-mix(in srgb,
64
+ var(--vscode-textPreformat-background, #818b981f) 60%, transparent);
65
+ }
66
+
67
+ .vscode-high-contrast .md-editor.md-theme-vscode-github,
68
+ .vscode-high-contrast-light .md-editor.md-theme-vscode-github {
69
+ --md-inline-code-background: var(--vscode-textPreformat-background, #818b981f);
70
+ }
71
+
72
+ .md-theme-vscode-github .md-heading {
73
+ margin-top: 24px;
74
+ margin-bottom: 16px;
75
+ font-weight: 600;
76
+ line-height: 1.25;
77
+ }
78
+
79
+ .md-theme-vscode-github h1.md-heading {
80
+ font-size: 2em;
81
+ padding-bottom: 0.3em;
82
+ border-bottom: 1px solid var(--vscode-textSeparator-foreground, #d1d9e0b3);
83
+ }
84
+
85
+ .md-theme-vscode-github h2.md-heading {
86
+ font-size: 1.5em;
87
+ padding-bottom: 0.3em;
88
+ border-bottom: 1px solid var(--vscode-textSeparator-foreground, #d1d9e0b3);
89
+ }
90
+
91
+ .md-theme-vscode-github h3.md-heading {
92
+ font-size: 1.25em;
93
+ }
94
+
95
+ .md-theme-vscode-github h4.md-heading {
96
+ font-size: 1em;
97
+ }
98
+
99
+ .md-theme-vscode-github h5.md-heading {
100
+ font-size: 0.875em;
101
+ }
102
+
103
+ .md-theme-vscode-github h6.md-heading {
104
+ font-size: 0.85em;
105
+ color: var(--vscode-descriptionForeground, #59636e);
106
+ }
107
+
108
+ .md-theme-vscode-github .md-paragraph {
109
+ margin-top: 0;
110
+ margin-bottom: 16px;
111
+ }
112
+
113
+ .md-theme-vscode-github .md-blockquote {
114
+ margin: 0 0 16px 0;
115
+ padding: 0 1em;
116
+ /*
117
+ * The left padding the `>` gutter hangs in (matches padding-left: 1em at
118
+ * the base font). Must be an absolute length, not `1em`: the marker
119
+ * positions itself with this var inside its own (smaller, 0.85em) font
120
+ * context, so an `em` value would resolve against the marker's font-size
121
+ * and pull the `>` out of alignment with the text.
122
+ */
123
+ --md-blockquote-pad: 16px;
124
+ color: var(--vscode-descriptionForeground, #59636e);
125
+ border-left: 0.25em solid var(--vscode-textBlockQuote-border, #d1d9e0);
126
+ }
127
+
128
+ .md-theme-vscode-github .md-list {
129
+ margin-top: 0;
130
+ margin-bottom: 16px;
131
+ padding-left: 2em;
132
+ /* The per-level indentation step the list gutter fills (matches padding-left). */
133
+ --md-list-indent-step: 2em;
134
+ }
135
+
136
+ .md-theme-vscode-github .md-thematic-break {
137
+ height: 0.25em;
138
+ padding: 0;
139
+ margin: 24px 0;
140
+ background-color: var(--vscode-textSeparator-foreground, #d1d9e0);
141
+ border: 0;
142
+ }
143
+
144
+ .md-theme-vscode-github a {
145
+ color: var(--vscode-textLink-foreground, #0969da);
146
+ text-decoration: none;
147
+ }
148
+
149
+ .md-theme-vscode-github a:hover {
150
+ text-decoration: underline;
151
+ }
152
+
153
+ .md-theme-vscode-github strong {
154
+ font-weight: 600;
155
+ }
156
+
157
+ /* Inline code. */
158
+ .md-theme-vscode-github :not(pre)>code {
159
+ font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
160
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
161
+ font-size: 85%;
162
+ padding: 0.2em 0.4em;
163
+ margin: 0;
164
+ color: var(--vscode-textPreformat-foreground, inherit);
165
+ background-color: var(--md-inline-code-background);
166
+ border-radius: 6px;
167
+ white-space: break-spaces;
168
+ }
169
+
170
+ /* Fenced code block. */
171
+ .md-theme-vscode-github .md-code-block {
172
+ margin-top: 0;
173
+ margin-bottom: 16px;
174
+ padding: 10px 16px;
175
+ font-size: 85%;
176
+ line-height: 1.45;
177
+ background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
178
+ border-radius: 6px;
179
+ }
180
+
181
+ .md-theme-vscode-github .md-code-block code {
182
+ font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
183
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
184
+ padding: 0;
185
+ background-color: transparent;
186
+ border-radius: 0;
187
+ }
188
+
189
+ /*
190
+ * Syntax-highlight token colors. Driven by `--md-tok-*` custom properties so
191
+ * the explorer (or any embedder) can supply a palette matched to the active
192
+ * color theme. Fallbacks are the VS Code light theme palette.
193
+ */
194
+ .md-theme-vscode-github .md-code-block .tok-keyword {
195
+ color: var(--md-tok-keyword, #0000ff);
196
+ }
197
+
198
+ .md-theme-vscode-github .md-code-block .tok-string {
199
+ color: var(--md-tok-string, #a31515);
200
+ }
201
+
202
+ .md-theme-vscode-github .md-code-block .tok-comment {
203
+ color: var(--md-tok-comment, #008000);
204
+ }
205
+
206
+ .md-theme-vscode-github .md-code-block .tok-number {
207
+ color: var(--md-tok-number, #098658);
208
+ }
209
+
210
+ .md-theme-vscode-github .md-code-block .tok-regexp {
211
+ color: var(--md-tok-regexp, #811f3f);
212
+ }
213
+
214
+ .md-theme-vscode-github .md-code-block .tok-type {
215
+ color: var(--md-tok-type, #267f99);
216
+ }
217
+
218
+ .md-theme-vscode-github .md-code-block .tok-annotation {
219
+ color: var(--md-tok-annotation, #267f99);
220
+ }
221
+
222
+ .md-theme-vscode-github .md-code-block .tok-tag {
223
+ color: var(--md-tok-tag, #800000);
224
+ }
225
+
226
+ .md-theme-vscode-github .md-code-block .tok-attribute {
227
+ color: var(--md-tok-attribute, #e50000);
228
+ }
229
+
230
+ .md-theme-vscode-github .md-code-block .tok-delimiter {
231
+ color: var(--md-tok-delimiter, inherit);
232
+ }
233
+
234
+ /*
235
+ * Display math has no container styling (KaTeX renders it inline-centered).
236
+ * Keep only the block spacing; horizontal scroll comes from the base sheet.
237
+ */
238
+ .md-theme-vscode-github .md-math-block {
239
+ margin-top: 0;
240
+ margin-bottom: 16px;
241
+ }
242
+
243
+ /*
244
+ * KaTeX renders inline math at 1.21em with its own (larger) line-height, which
245
+ * would inflate the surrounding line box. Collapse it so the rendered math fits
246
+ * the text line and the paragraph height stays identical active vs inactive.
247
+ */
248
+ .md-theme-vscode-github .md-inline-math .katex {
249
+ line-height: 1;
250
+ }
251
+
252
+ .md-theme-vscode-github .md-table-wrapper {
253
+ /* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
254
+ with siblings as before; the inner table has no margin of its own. */
255
+ margin-top: 0;
256
+ margin-bottom: 16px;
257
+ }
258
+
259
+ .md-theme-vscode-github .md-table {
260
+ border-collapse: collapse;
261
+ width: auto;
262
+ }
263
+
264
+ .md-theme-vscode-github .md-table th,
265
+ .md-theme-vscode-github .md-table td {
266
+ padding: 6px 13px;
267
+ border: 1px solid var(--vscode-editorWidget-border, #d1d9e0);
268
+ text-align: left;
269
+ }
270
+
271
+ /*
272
+ * The editor renders every cell as <td> in a flat <table> of <tr> (no
273
+ * <thead>/<tbody>/<th>). Row order is: header, delimiter row, body rows.
274
+ */
275
+ .md-theme-vscode-github .md-table tr:first-child td {
276
+ font-weight: 600;
277
+ padding-top: 11px;
278
+ padding-bottom: 11px;
279
+ }
280
+
281
+ /* Active: reclaim the header's extra spacing to host the delimiter row. */
282
+ .md-theme-vscode-github .md-table.md-block-active tr:first-child td {
283
+ padding-top: 3px;
284
+ padding-bottom: 3px;
285
+ }
286
+
287
+ .md-theme-vscode-github .md-table tr:nth-child(even):not(.md-table-delimiter-row) {
288
+ background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
289
+ }
290
+
291
+ /*
292
+ * The delimiter row (`| --- | --- |`) is editor source shown only while
293
+ * editing; render it borderless with no vertical padding so it occupies just
294
+ * the compact 10px reclaimed from the header.
295
+ */
296
+ .md-theme-vscode-github .md-table-delimiter-row td {
297
+ border: 0;
298
+ padding: 0 13px;
299
+ background: transparent;
300
+ }
301
+
302
+ /*
303
+ * Active table: the source `|` pipes ARE the outline. Drop the HTML cell
304
+ * borders (kept as transparent so the 1px box geometry — and thus the table's
305
+ * height and first-text X — is unchanged) and clear the zebra fill so the
306
+ * table reads as plain source.
307
+ */
308
+ .md-theme-vscode-github .md-table.md-block-active td {
309
+ border-color: transparent;
310
+ }
311
+
312
+ .md-theme-vscode-github .md-table.md-block-active tr:nth-child(even):not(.md-table-delimiter-row) td {
313
+ background-color: transparent;
314
+ }
315
+
316
+ /*
317
+ * Shift each cell's leading pipe onto its left gridline (where the border was)
318
+ * and the last cell's closing pipe onto the right gridline. `position:
319
+ * relative` moves only the painted glyph by the cell's horizontal padding;
320
+ * siblings and the glue's reserved width are untouched, so active/inactive
321
+ * height and first-text X stay pixel-identical.
322
+ */
323
+ .md-theme-vscode-github .md-table.md-block-active td>.md-glue-tableCellGlue:first-child,
324
+ .md-theme-vscode-github .md-table.md-block-active .md-table-delimiter-row td>.md-marker-tableDelimiter {
325
+ position: relative;
326
+ left: -13px;
327
+ }
328
+
329
+ /*
330
+ * The last cell's closing `|` floats right after the (left-aligned) cell text.
331
+ * Pin it to the column's right gridline (the cell's border edge, 13px past the
332
+ * content box) so the right outline is a straight line. `top: auto` keeps the
333
+ * pipe on the content line (the shared editor.css rule takes it out of flow);
334
+ * the previous `top: 0` floated it to the cell's top edge, so on tall/wrapping
335
+ * rows it no longer lined up with the in-flow leading pipes.
336
+ */
337
+ .md-theme-vscode-github .md-table.md-block-active td:last-child {
338
+ position: relative;
339
+ }
340
+
341
+ .md-theme-vscode-github .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
342
+ position: absolute;
343
+ right: 0;
344
+ top: auto;
345
+ }
346
+
347
+ /*
348
+ * The delimiter row's last cell carries its closing `|` as a separate
349
+ * `tableDelimiterClose` marker; pin it to the same right gridline as the body
350
+ * rows' closing pipe so the last column's outline stays straight.
351
+ */
352
+ .md-theme-vscode-github .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
353
+ position: absolute;
354
+ right: 0;
355
+ top: auto;
356
+ }