@vscode/markdown-editor 0.0.2-2 → 0.0.2-20

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