@vscode/markdown-editor 0.0.2-12 → 0.0.2-120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +571 -0
- package/dist/commands.d.ts +67 -0
- package/dist/commands.js +185 -0
- package/dist/commands.js.map +1 -0
- package/dist/config-BGeaJqWk.js +286 -0
- package/dist/config-BGeaJqWk.js.map +1 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +1964 -155
- package/dist/index.js +8134 -2188
- package/dist/index.js.map +1 -1
- package/dist/markdown-editor.css +1 -0
- package/dist/stringEdit-CVDbCUBY.js +215 -0
- package/dist/stringEdit-CVDbCUBY.js.map +1 -0
- package/dist/web-editors.d.ts +297 -0
- package/dist/web-editors.js +7359 -0
- package/dist/web-editors.js.map +1 -0
- package/package.json +66 -17
- package/src/contrib/comments/commentInput.css +89 -0
- package/src/contrib/comments/commentWidget.css +60 -0
- package/src/contrib/find/find.css +347 -0
- package/src/contrib/rename/rename.css +73 -0
- package/src/contrib/suggest/suggest.css +109 -0
- package/src/view/editor.css +1603 -66
- package/src/view/themes/default.css +21 -4
- package/src/view/themes/github.css +25 -13
- package/src/view/themes/vscode-default.css +407 -0
- package/src/view/themes/{vscode.css → vscode-github.css} +134 -62
- package/dist/_observables/assert.d.ts +0 -2
- package/dist/_observables/deps.d.ts +0 -28
- package/dist/_observables/disposables.d.ts +0 -19
- package/dist/_observables/equals.d.ts +0 -32
- package/dist/_observables/index.d.ts +0 -2
- package/dist/_observables/observableInternal/base.d.ts +0 -172
- package/dist/_observables/observableInternal/changeTracker.d.ts +0 -44
- package/dist/_observables/observableInternal/commonFacade/cancellation.d.ts +0 -24
- package/dist/_observables/observableInternal/commonFacade/deps.d.ts +0 -24
- package/dist/_observables/observableInternal/debugLocation.d.ts +0 -21
- package/dist/_observables/observableInternal/debugName.d.ts +0 -33
- package/dist/_observables/observableInternal/experimental/deferUnobserve.d.ts +0 -16
- package/dist/_observables/observableInternal/experimental/reducer.d.ts +0 -37
- package/dist/_observables/observableInternal/experimental/utils.d.ts +0 -15
- package/dist/_observables/observableInternal/index.d.ts +0 -25
- package/dist/_observables/observableInternal/logging/consoleObservableLogger.d.ts +0 -40
- package/dist/_observables/observableInternal/logging/debugGetDependencyGraph.d.ts +0 -4
- package/dist/_observables/observableInternal/logging/debugger/debuggerRpc.d.ts +0 -4
- package/dist/_observables/observableInternal/logging/debugger/devToolsLogger.d.ts +0 -43
- package/dist/_observables/observableInternal/logging/debugger/rpc.d.ts +0 -41
- package/dist/_observables/observableInternal/logging/debugger/utils.d.ts +0 -13
- package/dist/_observables/observableInternal/logging/logging.d.ts +0 -30
- package/dist/_observables/observableInternal/map.d.ts +0 -18
- package/dist/_observables/observableInternal/observables/baseObservable.d.ts +0 -58
- package/dist/_observables/observableInternal/observables/constObservable.d.ts +0 -5
- package/dist/_observables/observableInternal/observables/derived.d.ts +0 -46
- package/dist/_observables/observableInternal/observables/derivedImpl.d.ts +0 -83
- package/dist/_observables/observableInternal/observables/lazyObservableValue.d.ts +0 -27
- package/dist/_observables/observableInternal/observables/observableFromEvent.d.ts +0 -37
- package/dist/_observables/observableInternal/observables/observableSignal.d.ts +0 -11
- package/dist/_observables/observableInternal/observables/observableSignalFromEvent.d.ts +0 -5
- package/dist/_observables/observableInternal/observables/observableValue.d.ts +0 -37
- package/dist/_observables/observableInternal/observables/observableValueOpts.d.ts +0 -8
- package/dist/_observables/observableInternal/reactions/autorun.d.ts +0 -56
- package/dist/_observables/observableInternal/reactions/autorunImpl.d.ts +0 -53
- package/dist/_observables/observableInternal/set.d.ts +0 -17
- package/dist/_observables/observableInternal/transaction.d.ts +0 -27
- package/dist/_observables/observableInternal/utils/promise.d.ts +0 -75
- package/dist/_observables/observableInternal/utils/runOnChange.d.ts +0 -7
- package/dist/_observables/observableInternal/utils/utils.d.ts +0 -43
- package/dist/_observables/observableInternal/utils/utilsCancellation.d.ts +0 -10
- package/dist/_observables/observableInternal/utils/valueWithChangeEvent.d.ts +0 -10
- package/dist/_observables/utils.d.ts +0 -15
- package/dist/observables.d.ts +0 -4
- package/dist/observables.js +0 -439
- package/dist/observables.js.map +0 -1
- package/dist/runOnChange-C00UIwqQ.js +0 -1538
- package/dist/runOnChange-C00UIwqQ.js.map +0 -1
package/src/view/editor.css
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@import '@vscode/codicons/dist/codicon.css';
|
|
2
|
+
@import '../contrib/find/find.css';
|
|
3
|
+
|
|
1
4
|
/*
|
|
2
5
|
* Base editor styles — ABSOLUTE MINIMUM.
|
|
3
6
|
*
|
|
@@ -17,16 +20,35 @@
|
|
|
17
20
|
* theme-agnostic and know nothing about VS Code. Where a value needs to vary
|
|
18
21
|
* per theme, expose a local `--md-*` custom property WITH a sensible literal
|
|
19
22
|
* fallback (e.g. `var(--md-cursor-background, #000)`) and let a theme file set
|
|
20
|
-
* it. Only `themes/vscode
|
|
21
|
-
* map them onto these `--md-*` properties.
|
|
23
|
+
* it. Only the `themes/vscode-*.css` themes are permitted to read `--vscode-*`
|
|
24
|
+
* variables and map them onto these `--md-*` properties.
|
|
22
25
|
*/
|
|
23
26
|
|
|
24
27
|
.md-editor {
|
|
28
|
+
--md-marker-font-family: 'Cascadia Code', 'Fira Code', monospace;
|
|
29
|
+
--md-marker-font-scale: 0.85;
|
|
30
|
+
--md-readonly-toggle-width: 58px;
|
|
31
|
+
--md-readonly-toggle-height: 32px;
|
|
32
|
+
--md-readonly-toggle-inset: 8px;
|
|
33
|
+
display: flow-root;
|
|
34
|
+
min-height: 100%;
|
|
25
35
|
outline: none;
|
|
26
36
|
/* The editor paints its own cursor (`.md-cursor`); hide the native caret. */
|
|
27
37
|
caret-color: transparent;
|
|
28
38
|
}
|
|
29
39
|
|
|
40
|
+
.md-editor-a11y-status {
|
|
41
|
+
position: absolute;
|
|
42
|
+
width: 1px;
|
|
43
|
+
height: 1px;
|
|
44
|
+
padding: 0;
|
|
45
|
+
margin: -1px;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
clip: rect(0, 0, 0, 0);
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
border: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
30
52
|
/*
|
|
31
53
|
* The transient empty paragraph — the blank line conjured by pressing Enter at
|
|
32
54
|
* the end of a paragraph (see `PendingParagraph` in the model). It is not part
|
|
@@ -42,20 +64,66 @@
|
|
|
42
64
|
* overlays, which position themselves relative to this box, so it is the
|
|
43
65
|
* positioning context. In limited-width mode the editor sets an inline
|
|
44
66
|
* `max-width` here and the auto inline margins center it within the full-width
|
|
45
|
-
* `.md-editor`.
|
|
67
|
+
* `.md-editor`. The block-start padding keeps every document clear of the top
|
|
68
|
+
* edge, independent of the first block's theme margins.
|
|
46
69
|
*/
|
|
47
70
|
.md-editor-content {
|
|
71
|
+
--md-editor-min-inline-padding: 8px;
|
|
72
|
+
--md-editor-content-inline-start-padding: var(--md-editor-min-inline-padding);
|
|
73
|
+
--md-editor-content-inline-end-padding: var(--md-editor-content-inline-start-padding);
|
|
48
74
|
position: relative;
|
|
75
|
+
display: flow-root;
|
|
49
76
|
margin-inline: auto;
|
|
50
|
-
padding:
|
|
77
|
+
padding-block: 32px 0;
|
|
78
|
+
padding-inline: var(--md-editor-content-inline-start-padding) var(--md-editor-content-inline-end-padding);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.md-editor-medium-margins > .md-editor-content {
|
|
82
|
+
--md-editor-content-inline-start-padding: max(var(--md-editor-min-inline-padding), 48px);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.md-editor-content:has(> .md-document > .md-heading) {
|
|
86
|
+
--md-editor-min-inline-padding: 2em;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.md-editor-content>.md-document :is(.md-heading, .md-paragraph) {
|
|
90
|
+
overflow-wrap: anywhere;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.md-editor .md-document > :first-child,
|
|
94
|
+
.md-editor .md-blockquote > :nth-child(1 of .md-block) {
|
|
95
|
+
margin-block-start: 0;
|
|
51
96
|
}
|
|
52
97
|
|
|
53
|
-
.md-block-active {
|
|
98
|
+
:where(.md-editor:not(.md-no-active-block-highlight)) .md-block-active {
|
|
54
99
|
background: var(--md-block-active-background, #f8f8f8);
|
|
55
100
|
border-radius: 4px;
|
|
56
101
|
box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
|
|
57
102
|
}
|
|
58
103
|
|
|
104
|
+
/*
|
|
105
|
+
* The whole-empty-document case. Markdown has no empty-paragraph node, so a
|
|
106
|
+
* document with no content parses to a single empty paragraph (see
|
|
107
|
+
* `_ensureBlocks` in the parser) which renders as a childless `<p>` of zero
|
|
108
|
+
* height. Give it one line's height so the editor presents an intentional,
|
|
109
|
+
* clickable empty editing surface — and so typing the first character causes no
|
|
110
|
+
* layout shift (a filled line is also one `lh` tall).
|
|
111
|
+
*/
|
|
112
|
+
.md-paragraph:empty {
|
|
113
|
+
min-height: 1lh;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/*
|
|
117
|
+
* ...and never paint the active-block card over that zero-content line: with no
|
|
118
|
+
* text to size it, the card's background + 8px box-shadow glow would show up as
|
|
119
|
+
* a stray gray bar. The two extra classes outrank the base `.md-block-active`
|
|
120
|
+
* rule above in every theme (themes only remap `--md-block-active-background`).
|
|
121
|
+
*/
|
|
122
|
+
.md-paragraph:empty.md-block-active {
|
|
123
|
+
background: transparent;
|
|
124
|
+
box-shadow: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
59
127
|
/*
|
|
60
128
|
* Cursor mirrors the same open affordance as the underline below: the anchor's
|
|
61
129
|
* pointer cursor appears exactly when a click would open the link. An inactive
|
|
@@ -87,6 +155,560 @@
|
|
|
87
155
|
text-decoration: none;
|
|
88
156
|
}
|
|
89
157
|
|
|
158
|
+
.md-rich-link {
|
|
159
|
+
display: inline-flex;
|
|
160
|
+
align-items: baseline;
|
|
161
|
+
max-width: min(100%, var(--md-rich-link-line-width, 52rem));
|
|
162
|
+
box-sizing: border-box;
|
|
163
|
+
gap: 0.24em;
|
|
164
|
+
padding: 1px 0.3em;
|
|
165
|
+
border: 1px solid color-mix(in srgb, var(--vscode-textLink-foreground, #0969da) 24%, transparent);
|
|
166
|
+
border-radius: 0.3em;
|
|
167
|
+
background: var(--vscode-button-secondaryBackground, #f3f3f3);
|
|
168
|
+
color: inherit;
|
|
169
|
+
font-size: 1em;
|
|
170
|
+
line-height: 1.25;
|
|
171
|
+
text-decoration: none;
|
|
172
|
+
vertical-align: baseline;
|
|
173
|
+
white-space: nowrap;
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
--md-rich-link-success-color: var(--vscode-charts-green, #1f883d);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.md-rich-link:hover {
|
|
179
|
+
border-color: var(--vscode-focusBorder, color-mix(in srgb, currentColor 42%, transparent));
|
|
180
|
+
background: var(--vscode-button-secondaryHoverBackground, #e5e5e5);
|
|
181
|
+
text-decoration: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.md-rich-link:focus-visible {
|
|
185
|
+
outline: 1px solid var(--vscode-focusBorder, currentColor);
|
|
186
|
+
outline-offset: 1px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.md-rich-link-icon {
|
|
190
|
+
flex: none;
|
|
191
|
+
align-self: center;
|
|
192
|
+
font-size: 0.92em;
|
|
193
|
+
color: color-mix(in srgb, var(--vscode-textLink-foreground, #0969da) 78%, currentColor);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.md-rich-link-label,
|
|
197
|
+
.md-rich-link-title,
|
|
198
|
+
.md-rich-link-detail {
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
text-overflow: ellipsis;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.md-rich-link-label,
|
|
204
|
+
.md-rich-link-title {
|
|
205
|
+
flex: 0 1 auto;
|
|
206
|
+
min-width: 0;
|
|
207
|
+
color: var(--vscode-textLink-foreground, currentColor);
|
|
208
|
+
font-weight: 600;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.md-rich-link-title {
|
|
212
|
+
max-width: var(--md-rich-link-title-width, 200px);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.md-rich-link-label {
|
|
216
|
+
max-width: var(--md-rich-link-title-width, none);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.md-rich-link[data-md-rich-link-kind='session'] :is(.md-rich-link-label, .md-rich-link-title) {
|
|
220
|
+
max-width: var(--md-rich-link-title-width, 150px);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.md-rich-link-line-end {
|
|
224
|
+
--md-rich-link-title-width: none;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.md-rich-link-label[hidden],
|
|
228
|
+
.md-rich-link-title[hidden],
|
|
229
|
+
.md-rich-link-reference[hidden] {
|
|
230
|
+
display: none;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.md-rich-link-reference {
|
|
234
|
+
flex: none;
|
|
235
|
+
color: var(--vscode-descriptionForeground, color-mix(in srgb, currentColor 72%, transparent));
|
|
236
|
+
font-size: 0.92em;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.md-rich-link-detail {
|
|
240
|
+
flex: 1 1 auto;
|
|
241
|
+
min-width: 1.5em;
|
|
242
|
+
color: var(--vscode-descriptionForeground, color-mix(in srgb, currentColor 72%, transparent));
|
|
243
|
+
font-size: 0.92em;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.md-rich-link-detail::before {
|
|
247
|
+
content: '·';
|
|
248
|
+
margin-right: 0.28em;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.md-rich-link-status {
|
|
252
|
+
flex: none;
|
|
253
|
+
display: inline-flex;
|
|
254
|
+
align-self: center;
|
|
255
|
+
align-items: center;
|
|
256
|
+
gap: 0.22em;
|
|
257
|
+
margin-left: 0.04em;
|
|
258
|
+
color: var(--vscode-descriptionForeground, currentColor);
|
|
259
|
+
font-size: 0.86em;
|
|
260
|
+
font-weight: 600;
|
|
261
|
+
line-height: 1;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.md-rich-link-detail[hidden],
|
|
265
|
+
.md-rich-link-changes[hidden],
|
|
266
|
+
.md-rich-link-status[hidden] {
|
|
267
|
+
display: none;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.md-rich-link-changes {
|
|
271
|
+
flex: none;
|
|
272
|
+
display: inline-flex;
|
|
273
|
+
align-self: center;
|
|
274
|
+
gap: 0.28em;
|
|
275
|
+
font-size: 0.86em;
|
|
276
|
+
font-weight: 600;
|
|
277
|
+
line-height: 1;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.md-rich-link-changes::before,
|
|
281
|
+
.md-rich-link:not(
|
|
282
|
+
[data-md-rich-link-kind='issue'],
|
|
283
|
+
[data-md-rich-link-kind='pullRequest'],
|
|
284
|
+
[data-md-rich-link-kind='session']
|
|
285
|
+
) .md-rich-link-primary-status::before {
|
|
286
|
+
content: '·';
|
|
287
|
+
color: var(--vscode-descriptionForeground, currentColor);
|
|
288
|
+
font-weight: 400;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.md-rich-link-insertions {
|
|
292
|
+
color: var(--vscode-charts-green, #1f883d);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.md-rich-link-deletions {
|
|
296
|
+
color: var(--vscode-charts-red, #cf222e);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.md-rich-link-status-icon {
|
|
300
|
+
flex: none;
|
|
301
|
+
align-self: center;
|
|
302
|
+
font-size: 1em;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.md-rich-link:is(
|
|
306
|
+
[data-md-rich-link-status='open'],
|
|
307
|
+
[data-md-rich-link-status='closed'],
|
|
308
|
+
[data-md-rich-link-status='merged'],
|
|
309
|
+
[data-md-rich-link-status='draft'],
|
|
310
|
+
[data-md-rich-link-status='notPlanned']
|
|
311
|
+
) .md-rich-link-primary-status {
|
|
312
|
+
color: var(--md-rich-link-state-color);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.md-rich-link-secondary-status {
|
|
316
|
+
margin-left: 0.06em;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.md-rich-link-secondary-status::before {
|
|
320
|
+
content: '·';
|
|
321
|
+
margin-right: 0.08em;
|
|
322
|
+
color: var(--vscode-descriptionForeground, currentColor);
|
|
323
|
+
font-weight: 400;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.md-rich-link:is(
|
|
327
|
+
[data-md-rich-link-status='open'],
|
|
328
|
+
[data-md-rich-link-status='closed'],
|
|
329
|
+
[data-md-rich-link-status='merged'],
|
|
330
|
+
[data-md-rich-link-status='draft'],
|
|
331
|
+
[data-md-rich-link-status='notPlanned']
|
|
332
|
+
) .md-rich-link-primary-status {
|
|
333
|
+
align-self: baseline;
|
|
334
|
+
padding: 0;
|
|
335
|
+
border: 0;
|
|
336
|
+
border-radius: 0;
|
|
337
|
+
background: transparent;
|
|
338
|
+
font-size: 1em;
|
|
339
|
+
line-height: inherit;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.md-rich-link[data-md-rich-link-status='success'] .md-rich-link-primary-status {
|
|
343
|
+
color: var(--vscode-charts-green, #1f883d);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.md-rich-link[data-md-rich-link-secondary-status='success'] .md-rich-link-secondary-status {
|
|
347
|
+
color: var(--md-rich-link-success-color);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.md-rich-link[data-md-rich-link-status='warning'] .md-rich-link-primary-status,
|
|
351
|
+
.md-rich-link[data-md-rich-link-secondary-status='warning'] .md-rich-link-secondary-status {
|
|
352
|
+
color: var(--vscode-editorWarning-foreground, #bf8700);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.md-rich-link[data-md-rich-link-status='error'] .md-rich-link-primary-status,
|
|
356
|
+
.md-rich-link[data-md-rich-link-secondary-status='error'] .md-rich-link-secondary-status {
|
|
357
|
+
color: var(--vscode-errorForeground, #cf222e);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.md-rich-link[data-md-rich-link-status='pending'] .md-rich-link-primary-status,
|
|
361
|
+
.md-rich-link[data-md-rich-link-secondary-status='pending'] .md-rich-link-secondary-status {
|
|
362
|
+
color: var(--vscode-editorWarning-foreground, #bf8700);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.md-rich-link[data-md-rich-link-kind='issue'] .md-rich-link-primary-status .md-rich-link-status-label,
|
|
366
|
+
.md-rich-link[data-md-rich-link-kind='pullRequest'] :is(
|
|
367
|
+
.md-rich-link-primary-status,
|
|
368
|
+
.md-rich-link-secondary-status
|
|
369
|
+
) .md-rich-link-status-label {
|
|
370
|
+
display: none;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.md-rich-link[data-md-rich-link-status='open'] {
|
|
374
|
+
--md-rich-link-state-color: var(--vscode-charts-green, #1f883d);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.md-rich-link[data-md-rich-link-kind='issue'][data-md-rich-link-status='closed'],
|
|
378
|
+
.md-rich-link[data-md-rich-link-status='merged'] {
|
|
379
|
+
--md-rich-link-state-color: var(--vscode-charts-purple, #8250df);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.md-rich-link[data-md-rich-link-kind='pullRequest'][data-md-rich-link-status='closed'] {
|
|
383
|
+
--md-rich-link-state-color: var(--vscode-charts-red, #cf222e);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.md-rich-link[data-md-rich-link-status='draft'],
|
|
387
|
+
.md-rich-link[data-md-rich-link-status='notPlanned'] {
|
|
388
|
+
--md-rich-link-state-color: var(--vscode-descriptionForeground, #656d76);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.md-rich-link[data-md-rich-link-kind='pullRequest'][data-md-rich-link-secondary-status='error'] .md-rich-link-secondary-status {
|
|
392
|
+
color: var(--vscode-charts-red, var(--vscode-errorForeground, #cf222e));
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.md-rich-link:is(
|
|
396
|
+
[data-md-rich-link-kind='issue'],
|
|
397
|
+
[data-md-rich-link-kind='pullRequest']
|
|
398
|
+
) {
|
|
399
|
+
align-items: center;
|
|
400
|
+
gap: 4px;
|
|
401
|
+
padding: 1px 6px;
|
|
402
|
+
border-color: var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
|
|
403
|
+
border-radius: 4px;
|
|
404
|
+
background: var(--vscode-button-secondaryBackground, #f3f3f3);
|
|
405
|
+
color: var(--vscode-button-secondaryForeground, #242424);
|
|
406
|
+
font-size: 1em;
|
|
407
|
+
line-height: 1.25;
|
|
408
|
+
vertical-align: -0.5px;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.md-rich-link:is(
|
|
412
|
+
[data-md-rich-link-kind='issue'],
|
|
413
|
+
[data-md-rich-link-kind='pullRequest']
|
|
414
|
+
):hover {
|
|
415
|
+
border-color: var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
|
|
416
|
+
background: var(--vscode-button-secondaryHoverBackground, #e5e5e5);
|
|
417
|
+
color: var(--vscode-button-secondaryForeground, #242424);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.md-rich-link:is(
|
|
421
|
+
[data-md-rich-link-kind='issue'],
|
|
422
|
+
[data-md-rich-link-kind='pullRequest']
|
|
423
|
+
) .md-rich-link-reference {
|
|
424
|
+
display: none;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.md-rich-link:is(
|
|
428
|
+
[data-md-rich-link-kind='issue'],
|
|
429
|
+
[data-md-rich-link-kind='pullRequest']
|
|
430
|
+
) :is(
|
|
431
|
+
.md-rich-link-label,
|
|
432
|
+
.md-rich-link-title,
|
|
433
|
+
.md-rich-link-primary-status,
|
|
434
|
+
.md-rich-link-secondary-status
|
|
435
|
+
) {
|
|
436
|
+
align-self: center;
|
|
437
|
+
font-size: inherit;
|
|
438
|
+
line-height: inherit;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.md-rich-link:is(
|
|
442
|
+
[data-md-rich-link-kind='issue'],
|
|
443
|
+
[data-md-rich-link-kind='pullRequest']
|
|
444
|
+
) :is(.md-rich-link-label, .md-rich-link-title) {
|
|
445
|
+
position: relative;
|
|
446
|
+
top: 0.25px;
|
|
447
|
+
max-width: var(--md-rich-link-title-width, 200px);
|
|
448
|
+
color: inherit;
|
|
449
|
+
font-weight: 400;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.md-rich-link:is(
|
|
453
|
+
[data-md-rich-link-kind='issue'],
|
|
454
|
+
[data-md-rich-link-kind='pullRequest']
|
|
455
|
+
) .md-rich-link-status {
|
|
456
|
+
align-items: center;
|
|
457
|
+
height: 1.25em;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.md-rich-link:is(
|
|
461
|
+
[data-md-rich-link-kind='issue'],
|
|
462
|
+
[data-md-rich-link-kind='pullRequest']
|
|
463
|
+
) .md-rich-link-status-icon {
|
|
464
|
+
display: inline-flex;
|
|
465
|
+
align-items: center;
|
|
466
|
+
justify-content: center;
|
|
467
|
+
width: 12px;
|
|
468
|
+
height: 12px;
|
|
469
|
+
font-size: 12px;
|
|
470
|
+
line-height: 12px;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.md-rich-link:is(
|
|
474
|
+
[data-md-rich-link-kind='issue'],
|
|
475
|
+
[data-md-rich-link-kind='pullRequest']
|
|
476
|
+
) .md-rich-link-secondary-status::before {
|
|
477
|
+
align-self: center;
|
|
478
|
+
line-height: inherit;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.md-rich-link[data-md-rich-link-kind='session'] {
|
|
482
|
+
align-items: center;
|
|
483
|
+
gap: 4px;
|
|
484
|
+
padding: 1px 6px;
|
|
485
|
+
border-color: var(--vscode-chat-requestBorder, var(--vscode-input-border, color-mix(in srgb, currentColor 24%, transparent)));
|
|
486
|
+
border-radius: 4px;
|
|
487
|
+
background: var(--vscode-button-secondaryBackground, #f3f3f3);
|
|
488
|
+
color: var(--vscode-descriptionForeground, #656d76);
|
|
489
|
+
font-size: 1em;
|
|
490
|
+
font-weight: var(--vscode-agents-fontWeight-regular, 400);
|
|
491
|
+
line-height: 1.25;
|
|
492
|
+
vertical-align: baseline;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.md-rich-link[data-md-rich-link-kind='session']:hover {
|
|
496
|
+
border-color: var(--vscode-chat-requestBorder, var(--vscode-input-border, color-mix(in srgb, currentColor 24%, transparent)));
|
|
497
|
+
background: var(--vscode-toolbar-hoverBackground, color-mix(in srgb, currentColor 8%, transparent));
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.md-rich-link[data-md-rich-link-kind='session'] :is(.md-rich-link-label, .md-rich-link-title) {
|
|
501
|
+
color: inherit;
|
|
502
|
+
font-weight: 400;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-primary-status {
|
|
506
|
+
align-self: center;
|
|
507
|
+
align-items: center;
|
|
508
|
+
width: 12px;
|
|
509
|
+
height: 12px;
|
|
510
|
+
margin: 0;
|
|
511
|
+
padding: 0;
|
|
512
|
+
border: 0;
|
|
513
|
+
border-radius: 0;
|
|
514
|
+
background: transparent;
|
|
515
|
+
font-size: 1em;
|
|
516
|
+
line-height: inherit;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-primary-status .md-rich-link-status-label {
|
|
520
|
+
display: none;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-status-icon:not(.monaco-pixel-spinner, [hidden]) {
|
|
524
|
+
display: inline-flex;
|
|
525
|
+
align-items: center;
|
|
526
|
+
justify-content: center;
|
|
527
|
+
width: 12px;
|
|
528
|
+
height: 12px;
|
|
529
|
+
font-size: 12px;
|
|
530
|
+
line-height: 12px;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.md-rich-link .md-rich-link-status-icon[hidden] {
|
|
534
|
+
display: none;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='neutral'] .md-rich-link-primary-status,
|
|
538
|
+
.md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='success'] .md-rich-link-primary-status,
|
|
539
|
+
.md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='pending'] .md-rich-link-primary-status {
|
|
540
|
+
color: var(--vscode-descriptionForeground, #656d76);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.md-rich-link .monaco-pixel-spinner {
|
|
544
|
+
display: inline-grid;
|
|
545
|
+
grid-template-columns: repeat(2, 2px);
|
|
546
|
+
grid-template-rows: repeat(3, 2px);
|
|
547
|
+
column-gap: 2px;
|
|
548
|
+
row-gap: 2px;
|
|
549
|
+
place-content: center;
|
|
550
|
+
width: 16px;
|
|
551
|
+
height: 16px;
|
|
552
|
+
color: currentColor;
|
|
553
|
+
contain: layout style size paint;
|
|
554
|
+
isolation: isolate;
|
|
555
|
+
pointer-events: none;
|
|
556
|
+
transform: translateZ(0);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.md-rich-link[data-md-rich-link-kind='session'] .monaco-pixel-spinner {
|
|
560
|
+
width: 12px;
|
|
561
|
+
height: 12px;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.md-rich-link .monaco-pixel-spinner-dot {
|
|
565
|
+
display: block;
|
|
566
|
+
width: 2px;
|
|
567
|
+
height: 2px;
|
|
568
|
+
border-radius: 50%;
|
|
569
|
+
background-color: currentColor;
|
|
570
|
+
opacity: 0;
|
|
571
|
+
transform: translateY(-4px);
|
|
572
|
+
animation: monaco-pixel-spinner-dot-cycle 1820ms steps(6, jump-none) infinite;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.md-rich-link .monaco-pixel-spinner-dot:nth-child(1) {
|
|
576
|
+
animation-delay: 520ms;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.md-rich-link .monaco-pixel-spinner-dot:nth-child(2) {
|
|
580
|
+
animation-delay: 650ms;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.md-rich-link .monaco-pixel-spinner-dot:nth-child(3) {
|
|
584
|
+
animation-delay: 260ms;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.md-rich-link .monaco-pixel-spinner-dot:nth-child(4) {
|
|
588
|
+
animation-delay: 390ms;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.md-rich-link .monaco-pixel-spinner-dot:nth-child(5) {
|
|
592
|
+
animation-name: monaco-pixel-spinner-dot-cycle-long;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.md-rich-link .monaco-pixel-spinner-dot:nth-child(6) {
|
|
596
|
+
animation-name: monaco-pixel-spinner-dot-cycle-short;
|
|
597
|
+
animation-delay: 130ms;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot {
|
|
601
|
+
opacity: 0.25;
|
|
602
|
+
transform: none;
|
|
603
|
+
animation: monaco-pixel-spinner-ring-pulse 1200ms steps(4, jump-none) infinite;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(1) {
|
|
607
|
+
animation-delay: 0ms;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(2) {
|
|
611
|
+
animation-delay: 200ms;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(3) {
|
|
615
|
+
animation-delay: 1000ms;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(4) {
|
|
619
|
+
animation-delay: 400ms;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(5) {
|
|
623
|
+
animation-delay: 800ms;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(6) {
|
|
627
|
+
animation-delay: 600ms;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
@keyframes monaco-pixel-spinner-dot-cycle {
|
|
631
|
+
0% {
|
|
632
|
+
opacity: 0;
|
|
633
|
+
transform: translateY(-4px);
|
|
634
|
+
}
|
|
635
|
+
9.34%, 57.14% {
|
|
636
|
+
opacity: 1;
|
|
637
|
+
transform: translateY(0);
|
|
638
|
+
}
|
|
639
|
+
66.48%, 100% {
|
|
640
|
+
opacity: 0;
|
|
641
|
+
transform: translateY(7px);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
@keyframes monaco-pixel-spinner-dot-cycle-long {
|
|
646
|
+
0% {
|
|
647
|
+
opacity: 0;
|
|
648
|
+
transform: translateY(-4px);
|
|
649
|
+
}
|
|
650
|
+
9.34%, 64.29% {
|
|
651
|
+
opacity: 1;
|
|
652
|
+
transform: translateY(0);
|
|
653
|
+
}
|
|
654
|
+
73.63%, 100% {
|
|
655
|
+
opacity: 0;
|
|
656
|
+
transform: translateY(7px);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
@keyframes monaco-pixel-spinner-dot-cycle-short {
|
|
661
|
+
0% {
|
|
662
|
+
opacity: 0;
|
|
663
|
+
transform: translateY(-4px);
|
|
664
|
+
}
|
|
665
|
+
9.34%, 50% {
|
|
666
|
+
opacity: 1;
|
|
667
|
+
transform: translateY(0);
|
|
668
|
+
}
|
|
669
|
+
59.34%, 100% {
|
|
670
|
+
opacity: 0;
|
|
671
|
+
transform: translateY(7px);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
@keyframes monaco-pixel-spinner-ring-pulse {
|
|
676
|
+
0%, 100% {
|
|
677
|
+
opacity: 0.25;
|
|
678
|
+
transform: none;
|
|
679
|
+
}
|
|
680
|
+
16.67% {
|
|
681
|
+
opacity: 1;
|
|
682
|
+
transform: none;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
@media (prefers-reduced-motion: reduce) {
|
|
687
|
+
.md-rich-link .monaco-pixel-spinner-dot {
|
|
688
|
+
animation: none;
|
|
689
|
+
opacity: 1;
|
|
690
|
+
transform: translateY(0);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='warning'] .md-rich-link-primary-status {
|
|
695
|
+
color: var(--vscode-list-warningForeground, #855f00);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='warning'] {
|
|
699
|
+
border-color: var(--vscode-list-warningForeground, #855f00);
|
|
700
|
+
background-color: color-mix(in srgb, var(--vscode-list-warningForeground, #855f00) 12%, transparent);
|
|
701
|
+
color: var(--vscode-list-warningForeground, #855f00);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='error'] .md-rich-link-primary-status {
|
|
705
|
+
color: var(--vscode-errorForeground, #cf222e);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.md-rich-link-unavailable {
|
|
709
|
+
border-style: dashed;
|
|
710
|
+
}
|
|
711
|
+
|
|
90
712
|
.md-fence-spacer {
|
|
91
713
|
visibility: hidden;
|
|
92
714
|
font-family: 'Cascadia Code', 'Fira Code', monospace;
|
|
@@ -95,8 +717,8 @@
|
|
|
95
717
|
|
|
96
718
|
.md-marker {
|
|
97
719
|
color: #999;
|
|
98
|
-
font-family:
|
|
99
|
-
font-size:
|
|
720
|
+
font-family: var(--md-marker-font-family);
|
|
721
|
+
font-size: calc(1em * var(--md-marker-font-scale));
|
|
100
722
|
display: inline;
|
|
101
723
|
overflow: hidden;
|
|
102
724
|
max-width: 100px;
|
|
@@ -122,6 +744,88 @@
|
|
|
122
744
|
white-space: pre-wrap;
|
|
123
745
|
}
|
|
124
746
|
|
|
747
|
+
.md-video-wrapper {
|
|
748
|
+
max-width: 100%;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.md-video {
|
|
752
|
+
display: block;
|
|
753
|
+
max-width: 100%;
|
|
754
|
+
max-height: 100%;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.md-editor:not(.md-readonly) .md-video:not([controls]) {
|
|
758
|
+
cursor: text;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.md-video-source {
|
|
762
|
+
overflow-wrap: anywhere;
|
|
763
|
+
white-space: pre-wrap;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/*
|
|
767
|
+
* An unhandled block: a construct the parser does not model (setext heading,
|
|
768
|
+
* an extension token). Its raw source is shown verbatim,
|
|
769
|
+
* styled like a code block but visibly flagged as "not understood" by a dashed
|
|
770
|
+
* warning border, so the content is preserved and editable rather than silently
|
|
771
|
+
* dropped.
|
|
772
|
+
*
|
|
773
|
+
* The wrapper is the non-scrolling box (border + block spacing); the inner
|
|
774
|
+
* `.md-unhandled-scroll` <pre> is the horizontal scroller.
|
|
775
|
+
*/
|
|
776
|
+
.md-unhandled-block {
|
|
777
|
+
margin: 0.5em 0;
|
|
778
|
+
border: 1px dashed #d0a000;
|
|
779
|
+
border-radius: 4px;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
/*
|
|
783
|
+
* Inner scroller. Beats the per-theme `.md-theme-* .md-code-block` box rules
|
|
784
|
+
* (same class count) via the extra `pre` type selector: no margin/border of its
|
|
785
|
+
* own (those live on the wrapper).
|
|
786
|
+
*/
|
|
787
|
+
pre.md-unhandled-scroll.md-code-block {
|
|
788
|
+
margin: 0;
|
|
789
|
+
border: 0;
|
|
790
|
+
border-radius: 4px;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
/*
|
|
794
|
+
* Complete block HTML comments are authoring metadata, not unsupported-syntax
|
|
795
|
+
* warnings. Keep them source-identifiable but quiet while reading, and reveal
|
|
796
|
+
* their exact whitespace when the block becomes active.
|
|
797
|
+
*/
|
|
798
|
+
.md-html-comment {
|
|
799
|
+
margin: 0.125em 0 0.25em;
|
|
800
|
+
padding: 0.125em 0;
|
|
801
|
+
overflow: hidden;
|
|
802
|
+
color: var(--md-html-comment-foreground, #6e7378);
|
|
803
|
+
font-family: var(--md-html-comment-font-family, 'Cascadia Code', 'Fira Code', monospace);
|
|
804
|
+
font-size: 0.85em;
|
|
805
|
+
line-height: 1.5;
|
|
806
|
+
text-overflow: ellipsis;
|
|
807
|
+
white-space: nowrap;
|
|
808
|
+
transition: color 80ms ease-out;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.md-html-comment:not(.md-html-comment-source):hover {
|
|
812
|
+
color: var(--md-html-comment-hover-foreground, #45494e);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.md-html-comment-source {
|
|
816
|
+
overflow: visible;
|
|
817
|
+
text-overflow: clip;
|
|
818
|
+
white-space: pre-wrap;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.md-html-comment-syntax {
|
|
822
|
+
opacity: 0.6;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.md-html-comment-source .md-html-comment-syntax {
|
|
826
|
+
opacity: 1;
|
|
827
|
+
}
|
|
828
|
+
|
|
125
829
|
/*
|
|
126
830
|
* Visible whitespace indicators, shown only in the active/source view. The real
|
|
127
831
|
* whitespace character stays in the DOM (so source ↔ DOM mapping and selection
|
|
@@ -155,7 +859,7 @@
|
|
|
155
859
|
left: 0;
|
|
156
860
|
right: 0;
|
|
157
861
|
text-align: center;
|
|
158
|
-
color: #b0b0b0;
|
|
862
|
+
color: var(--md-whitespace-foreground, #b0b0b0);
|
|
159
863
|
pointer-events: none;
|
|
160
864
|
}
|
|
161
865
|
|
|
@@ -169,7 +873,7 @@
|
|
|
169
873
|
|
|
170
874
|
.md-ws-newline::before {
|
|
171
875
|
content: '↵';
|
|
172
|
-
color: #b0b0b0;
|
|
876
|
+
color: var(--md-whitespace-foreground, #b0b0b0);
|
|
173
877
|
pointer-events: none;
|
|
174
878
|
}
|
|
175
879
|
|
|
@@ -221,39 +925,162 @@
|
|
|
221
925
|
}
|
|
222
926
|
|
|
223
927
|
/*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
928
|
+
* A soft ending followed by an explicit blockquote continuation marker renders
|
|
929
|
+
* a real line break in both views. Its source newline is still mapped and is
|
|
930
|
+
* revealed while editing, but contributes no hidden width in rendered mode.
|
|
931
|
+
*/
|
|
932
|
+
.md-blockquote-linebreak-source-hidden {
|
|
933
|
+
display: none;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
/*
|
|
937
|
+
* Structural quote prefixes between child blocks can be owned by a source gap
|
|
938
|
+
* instead of an inline continuation marker. Keep the exact gap for active
|
|
939
|
+
* editing, but remove it entirely from inactive layout and hit testing.
|
|
940
|
+
*/
|
|
941
|
+
.md-glue-blockQuoteSourceGap.md-glue-hidden {
|
|
942
|
+
display: none;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
/* A fallback-font newline glyph must not increase the source line's height. */
|
|
946
|
+
.md-glue-blockQuoteSourceGap > .md-ws-newline-glyph {
|
|
947
|
+
line-height: 0;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
/*
|
|
951
|
+
* Glue normally keeps its inline footprint when hidden so source padding and
|
|
952
|
+
* widget gutters stay identical between active and inactive states. Hidden
|
|
953
|
+
* table-cell glue is the exception below: leaving it in inline flow lets its
|
|
954
|
+
* invisible spaces wrap around long cell content.
|
|
227
955
|
*/
|
|
228
956
|
.md-glue-hidden {
|
|
229
957
|
display: inline;
|
|
230
958
|
visibility: hidden;
|
|
231
959
|
}
|
|
232
960
|
|
|
961
|
+
/*
|
|
962
|
+
* Inactive table pipes stay in the DOM/source tree, but leave layout and
|
|
963
|
+
* hit-testing entirely. Keeping an invisible rect either in the content flow or
|
|
964
|
+
* over the cell padding can create phantom lines or steal clicks from visible
|
|
965
|
+
* text. Hidden source offsets therefore collapse to the neighboring semantic
|
|
966
|
+
* seam, matching other display-none markers. Visible pipes retain the per-theme
|
|
967
|
+
* active/source layout.
|
|
968
|
+
*/
|
|
969
|
+
.md-table td>.md-glue-tableCellGlue.md-glue-hidden {
|
|
970
|
+
display: none;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/*
|
|
974
|
+
* Active table: take each cell's TRAILING structural glue (the source space
|
|
975
|
+
* after the cell text, and — via the per-theme `right: 0` rule — the last
|
|
976
|
+
* column's closing `|`) out of the cell's inline flow. Left in flow, that glue
|
|
977
|
+
* wraps below long cell content (the same wrapping the hidden-glue note above
|
|
978
|
+
* describes), which makes the cell two lines tall: the browser's default
|
|
979
|
+
* `vertical-align: middle` then re-centres the other cells' single-line content
|
|
980
|
+
* in Y, their runs merge into one oversized VisualLine, and the caret — sized
|
|
981
|
+
* directly from that line box — grows far past the line height while the
|
|
982
|
+
* visible pipes drift apart row-to-row. Positioning the trailing glue
|
|
983
|
+
* absolutely removes it from wrapping flow while keeping its real client rects
|
|
984
|
+
* at the static (content-line) position, so caret placement, hit-testing,
|
|
985
|
+
* source mapping and injectivity are unchanged. `top`/`bottom: auto` keep it on
|
|
986
|
+
* that content line rather than the cell's top edge. This mirrors the inactive
|
|
987
|
+
* `display: none` above; the leading `| ` glue deliberately stays in flow (a
|
|
988
|
+
* relative glyph shift, per theme) so first-text X is preserved.
|
|
989
|
+
*
|
|
990
|
+
* `:not(:first-child)` restricts this to a genuine trailing glue: a non-empty
|
|
991
|
+
* cell emits leading + trailing glue, but an EMPTY cell parses to a single glue
|
|
992
|
+
* node that is simultaneously first and last child. That lone node is the
|
|
993
|
+
* cell's leading pipe, so it must stay in flow like every other leading pipe;
|
|
994
|
+
* excluding it keeps empty cells identical to their previous (base) behaviour.
|
|
995
|
+
*/
|
|
996
|
+
.md-table.md-block-active td {
|
|
997
|
+
position: relative;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
.md-table.md-block-active td>.md-glue-tableCellGlue:last-child:not(:first-child) {
|
|
1001
|
+
position: absolute;
|
|
1002
|
+
top: auto;
|
|
1003
|
+
bottom: auto;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
233
1006
|
/*
|
|
234
1007
|
* Inter-block glue: the run of blank lines between two top-level blocks. It is
|
|
235
1008
|
* mounted as the last inline child of the block that precedes it, so it sits at
|
|
236
1009
|
* the end of that block's last line rather than on its own lines between the
|
|
237
1010
|
* blocks. When a neighbouring block is active it is revealed: each blank-line
|
|
238
|
-
* newline shows a real `↵` glyph character (`.md-ws-newline-glyph`)
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* same height. When hidden it collapses to nothing.
|
|
1011
|
+
* newline shows a real `↵` glyph character (`.md-ws-newline-glyph`) so each
|
|
1012
|
+
* source offset remains distinct. The glyphs stay on the preceding source line
|
|
1013
|
+
* rather than introducing line breaks. When hidden the run collapses to nothing.
|
|
242
1014
|
*/
|
|
243
|
-
.md-glue-blockGap
|
|
1015
|
+
.md-glue-blockGap,
|
|
1016
|
+
.md-glue-blockQuoteSourceGap {
|
|
244
1017
|
white-space: normal;
|
|
245
1018
|
}
|
|
246
1019
|
|
|
247
1020
|
/*
|
|
248
1021
|
* The structural block break between two top-level blocks. Like `.md-glue-blockGap`
|
|
249
|
-
* its
|
|
250
|
-
* adds no height; its leading newline is painted as the blue break glyph
|
|
1022
|
+
* its newlines stay inline so the run adds no height; its leading newline is painted as the blue break glyph
|
|
251
1023
|
* (`.md-ws-blockbreak-glyph`).
|
|
252
1024
|
*/
|
|
253
1025
|
.md-glue-blockBreak {
|
|
254
1026
|
white-space: normal;
|
|
255
1027
|
}
|
|
256
1028
|
|
|
1029
|
+
.md-source-editing :is(.md-paragraph, .md-heading, .md-empty-block, td),
|
|
1030
|
+
.md-source-editing :is(.md-text, .md-marker) {
|
|
1031
|
+
white-space: pre-wrap;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.md-editor.md-source-editing .md-block,
|
|
1035
|
+
.md-editor.md-source-editing .md-list > li {
|
|
1036
|
+
margin-block: 0;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.md-source-editing .md-empty-block {
|
|
1040
|
+
min-height: 1lh;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.md-source-editing .md-list > .md-empty-block {
|
|
1044
|
+
list-style: none;
|
|
1045
|
+
counter-increment: list-item 0;
|
|
1046
|
+
margin-inline-start: calc(-1 * var(--md-list-indent-step, 2em));
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.md-source-editing .md-list > li > .md-empty-block {
|
|
1050
|
+
padding-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
.md-source-editing .md-glue-emptyLine {
|
|
1054
|
+
white-space: pre-wrap;
|
|
1055
|
+
visibility: visible;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.md-source-editing .md-glue-blockTerminator {
|
|
1059
|
+
display: none;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
.md-source-editing .md-glue-lineSuffix {
|
|
1063
|
+
white-space: pre-wrap;
|
|
1064
|
+
visibility: visible;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.md-source-editing .md-ws-newline::before {
|
|
1068
|
+
content: none;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
.md-source-editing :is(.md-ws-space, .md-ws-tab) {
|
|
1072
|
+
white-space: inherit;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/* These source holders already have a <br> supplying their line ending. */
|
|
1076
|
+
.md-source-block :is(.md-hardbreak-src, .md-blockquote-linebreak-source) {
|
|
1077
|
+
white-space: normal;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.md-source-block .md-blockquote-linebreak-source .md-ws-newline::before {
|
|
1081
|
+
content: none;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
257
1084
|
/*
|
|
258
1085
|
* The task-list checkbox marker (`[x]`/`[ ]`) is special: instead of being
|
|
259
1086
|
* removed from layout when hidden, it keeps its inline width (visibility
|
|
@@ -266,15 +1093,6 @@
|
|
|
266
1093
|
visibility: hidden;
|
|
267
1094
|
}
|
|
268
1095
|
|
|
269
|
-
/*
|
|
270
|
-
* Table cell-glue pipes (`| `) keep their inline footprint when hidden so the
|
|
271
|
-
* column widths stay identical active and inactive.
|
|
272
|
-
*/
|
|
273
|
-
.md-marker-tableCellGlue.md-marker-hidden {
|
|
274
|
-
display: inline;
|
|
275
|
-
visibility: hidden;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
1096
|
/*
|
|
279
1097
|
* The code-block fences (```lang / ```) each sit on their own source line. When
|
|
280
1098
|
* hidden they keep their vertical footprint (visibility hidden, not display
|
|
@@ -309,6 +1127,69 @@
|
|
|
309
1127
|
height: 16px;
|
|
310
1128
|
}
|
|
311
1129
|
|
|
1130
|
+
/*
|
|
1131
|
+
* A wide table scrolls horizontally inside its wrapper (the block box) instead
|
|
1132
|
+
* of overflowing the page and scrolling the editor's fixed left gutter away.
|
|
1133
|
+
* The wrapper is the scroll viewport the selection/caret clipping measures (see
|
|
1134
|
+
* `BlockViewNode.scrollElement` / `blockViewportClip`); the inner `<table>`
|
|
1135
|
+
* keeps `width: auto` (theme-defined) so it sizes to its content and overflows.
|
|
1136
|
+
*
|
|
1137
|
+
* `width: fit-content` keeps the wrapper hugging the table's intrinsic width, so
|
|
1138
|
+
* a narrow table — and the active-block glow redirected onto the wrapper below —
|
|
1139
|
+
* stays as wide as the table (unchanged from before this wrapper existed).
|
|
1140
|
+
* `max-width: 100%` caps it at the content column, past which the table
|
|
1141
|
+
* overflows and scrolls locally. This is the standard responsive-table pattern
|
|
1142
|
+
* (cf. GitHub's own `width: max-content; max-width: 100%`).
|
|
1143
|
+
*/
|
|
1144
|
+
.md-table-wrapper {
|
|
1145
|
+
overflow-x: auto;
|
|
1146
|
+
width: fit-content;
|
|
1147
|
+
max-width: 100%;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
.md-table:has(> .md-glue-blockGap) {
|
|
1151
|
+
position: relative;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/* Table trivia must not generate an anonymous row when source is revealed. */
|
|
1155
|
+
.md-table > .md-glue-blockGap {
|
|
1156
|
+
position: absolute;
|
|
1157
|
+
left: 100%;
|
|
1158
|
+
bottom: 0.3em;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.md-editor:not(.md-source-editing) .md-paragraph:has(> .md-glue-indent:first-child) {
|
|
1162
|
+
position: relative;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
.md-editor:not(.md-source-editing) .md-paragraph > .md-glue-indent:first-child {
|
|
1166
|
+
position: absolute;
|
|
1167
|
+
right: 100%;
|
|
1168
|
+
top: 0;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
/*
|
|
1172
|
+
* The active-block highlight is an *outset* glow (`box-shadow: 0 0 0 8px`).
|
|
1173
|
+
* Making the wrapper a scroll box (`overflow-x: auto`, which also forces
|
|
1174
|
+
* `overflow-y: auto`) clips descendant paint to its padding box, so the glow on
|
|
1175
|
+
* the inner active `<table>` would be cut off (the table has no horizontal
|
|
1176
|
+
* margin to give the shadow room). Render the generic active chrome on the
|
|
1177
|
+
* wrapper instead — a scroll box's own shadow is never clipped by its own
|
|
1178
|
+
* overflow, exactly like a code block carries the glow on its own scroller —
|
|
1179
|
+
* and drop it from the table, which keeps `md-block-active` purely for the
|
|
1180
|
+
* per-theme source-pipe styling.
|
|
1181
|
+
*/
|
|
1182
|
+
:where(.md-editor:not(.md-no-active-block-highlight)) .md-table-wrapper:has(> .md-table.md-block-active) {
|
|
1183
|
+
background: var(--md-block-active-background, #f8f8f8);
|
|
1184
|
+
border-radius: 4px;
|
|
1185
|
+
box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.md-table.md-block-active {
|
|
1189
|
+
background: none;
|
|
1190
|
+
box-shadow: none;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
312
1193
|
.md-selection-layer {
|
|
313
1194
|
position: absolute;
|
|
314
1195
|
top: 0;
|
|
@@ -374,6 +1255,7 @@
|
|
|
374
1255
|
/* Source markers occupy the gutter so toggling them never shifts content. */
|
|
375
1256
|
.md-heading {
|
|
376
1257
|
position: relative;
|
|
1258
|
+
min-height: 1lh;
|
|
377
1259
|
}
|
|
378
1260
|
|
|
379
1261
|
.md-heading>.md-marker:first-child {
|
|
@@ -390,7 +1272,7 @@
|
|
|
390
1272
|
display: inline-flex;
|
|
391
1273
|
align-items: center;
|
|
392
1274
|
justify-content: flex-end;
|
|
393
|
-
transform: scale(0.85);
|
|
1275
|
+
transform: scale(var(--md-heading-marker-scale, 0.85));
|
|
394
1276
|
transform-origin: right center;
|
|
395
1277
|
}
|
|
396
1278
|
|
|
@@ -403,6 +1285,18 @@
|
|
|
403
1285
|
display: none;
|
|
404
1286
|
}
|
|
405
1287
|
|
|
1288
|
+
/* Nested heading prefixes must not overlap their enclosing quote/list gutter. */
|
|
1289
|
+
.md-source-editing :is(.md-blockquote, .md-list) .md-heading > .md-marker:first-child {
|
|
1290
|
+
position: static;
|
|
1291
|
+
display: inline;
|
|
1292
|
+
font-size: calc(1em * var(--md-marker-font-scale));
|
|
1293
|
+
transform: none;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
.md-source-editing :is(.md-blockquote, .md-list) .md-heading > .md-marker-hidden:first-child {
|
|
1297
|
+
display: none;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
406
1300
|
/*
|
|
407
1301
|
* Block-quote prefixes (`> `, one per quoted source line) are real
|
|
408
1302
|
* `blockQuoteMarker` markers, siblings of the quote's child blocks. Each hangs
|
|
@@ -422,11 +1316,33 @@
|
|
|
422
1316
|
position: relative;
|
|
423
1317
|
}
|
|
424
1318
|
|
|
425
|
-
.md-blockquote>.md-marker-blockQuoteMarker
|
|
1319
|
+
.md-blockquote>.md-marker-blockQuoteMarker,
|
|
1320
|
+
.md-source-editing li > .md-glue-blockQuotePrefix {
|
|
426
1321
|
position: absolute;
|
|
427
|
-
right: calc(100% - var(--md-blockquote-pad, 0px));
|
|
1322
|
+
right: calc(100% - var(--md-blockquote-pad, 0px) - 1ch);
|
|
428
1323
|
top: auto;
|
|
1324
|
+
/*
|
|
1325
|
+
* Reserve the optional-space column so adding it cannot move the `>` glyph,
|
|
1326
|
+
* then shift and scale every active quote marker consistently to leave a
|
|
1327
|
+
* virtual gap before body text without consuming source width. These tuned
|
|
1328
|
+
* properties are shared by ordinary and marker-only quote lines.
|
|
1329
|
+
*/
|
|
1330
|
+
--md-blockquote-marker-shift: -0.18ch;
|
|
1331
|
+
--md-blockquote-marker-scale: 0.9;
|
|
1332
|
+
display: inline-flex;
|
|
1333
|
+
min-width: 2ch;
|
|
1334
|
+
font-size: inherit;
|
|
1335
|
+
line-height: inherit;
|
|
1336
|
+
height: 1lh;
|
|
1337
|
+
align-items: center;
|
|
1338
|
+
text-align: left;
|
|
429
1339
|
white-space: pre;
|
|
1340
|
+
transform: translateX(var(--md-blockquote-marker-shift)) scale(var(--md-blockquote-marker-scale));
|
|
1341
|
+
transform-origin: left center;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
.md-source-editing li > .md-glue-blockQuotePrefix {
|
|
1345
|
+
right: calc(100% + var(--md-list-indent-step, 2em) - 1ch);
|
|
430
1346
|
}
|
|
431
1347
|
|
|
432
1348
|
/* Inactive: gone entirely (the gutter is empty, the text stays put). */
|
|
@@ -434,9 +1350,106 @@
|
|
|
434
1350
|
display: none;
|
|
435
1351
|
}
|
|
436
1352
|
|
|
437
|
-
/*
|
|
438
|
-
.md-
|
|
439
|
-
|
|
1353
|
+
/* Collapsed block-gap newlines still need one flow box per marker-only line. */
|
|
1354
|
+
.md-blockquote-line-anchor {
|
|
1355
|
+
display: block;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
/* A trailing marker-only source line follows the preceding quoted line directly. */
|
|
1359
|
+
.md-blockquote-marker-only-line>.md-paragraph:last-of-type {
|
|
1360
|
+
margin-bottom: 0;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
/* Code/math blocks scroll horizontally; their look is theme-defined. */
|
|
1364
|
+
.md-code-block {
|
|
1365
|
+
overflow-x: auto;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/* Keep actions out of the horizontal scroller and sticky within a long block. */
|
|
1369
|
+
.md-code-block-container {
|
|
1370
|
+
display: flow-root;
|
|
1371
|
+
position: relative;
|
|
1372
|
+
min-width: 0;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.md-code-block-container > .md-code-block {
|
|
1376
|
+
box-sizing: border-box;
|
|
1377
|
+
min-height: 36px;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
.md-code-block-actions {
|
|
1381
|
+
position: sticky;
|
|
1382
|
+
top: 0;
|
|
1383
|
+
z-index: 2;
|
|
1384
|
+
display: flex;
|
|
1385
|
+
align-items: center;
|
|
1386
|
+
justify-content: flex-end;
|
|
1387
|
+
gap: 6px;
|
|
1388
|
+
box-sizing: border-box;
|
|
1389
|
+
height: 32px;
|
|
1390
|
+
margin-bottom: -32px;
|
|
1391
|
+
padding: 4px 4px 0;
|
|
1392
|
+
opacity: 0;
|
|
1393
|
+
pointer-events: none;
|
|
1394
|
+
user-select: none;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
.md-code-block-container:hover>.md-code-block-actions,
|
|
1398
|
+
.md-code-block-actions:focus-within,
|
|
1399
|
+
.md-code-block-actions.md-code-block-copy-feedback {
|
|
1400
|
+
opacity: 1;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
.md-code-block-copy {
|
|
1404
|
+
display: inline-flex;
|
|
1405
|
+
align-items: center;
|
|
1406
|
+
justify-content: center;
|
|
1407
|
+
flex: none;
|
|
1408
|
+
width: 28px;
|
|
1409
|
+
height: 28px;
|
|
1410
|
+
padding: 4px;
|
|
1411
|
+
border: 1px solid var(--md-readonly-border, #b8b8b8);
|
|
1412
|
+
border-radius: 4px;
|
|
1413
|
+
background: var(--md-readonly-background, #f3f3f3);
|
|
1414
|
+
color: var(--md-readonly-foreground, #444444);
|
|
1415
|
+
cursor: pointer;
|
|
1416
|
+
pointer-events: auto;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
.md-code-block-copy:hover {
|
|
1420
|
+
background: var(--md-readonly-background-hover, #e9e9e9);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
.md-code-block-copy:focus-visible {
|
|
1424
|
+
outline: 2px solid var(--md-readonly-accent, #4c8bf5);
|
|
1425
|
+
outline-offset: 1px;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
.md-code-block-copy-status:not(:empty) {
|
|
1429
|
+
padding: 2px 6px;
|
|
1430
|
+
border-radius: 4px;
|
|
1431
|
+
background: var(--md-readonly-background, #f3f3f3);
|
|
1432
|
+
color: var(--md-readonly-foreground, #444444);
|
|
1433
|
+
font: 12px/1.4 sans-serif;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
@media (hover: none) {
|
|
1437
|
+
.md-code-block-actions {
|
|
1438
|
+
opacity: 1;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
@media (forced-colors: active) {
|
|
1443
|
+
.md-code-block-copy,
|
|
1444
|
+
.md-code-block-copy-status:not(:empty) {
|
|
1445
|
+
background: ButtonFace;
|
|
1446
|
+
color: ButtonText;
|
|
1447
|
+
border-color: ButtonText;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
.md-code-block-copy:focus-visible {
|
|
1451
|
+
outline-color: Highlight;
|
|
1452
|
+
}
|
|
440
1453
|
}
|
|
441
1454
|
|
|
442
1455
|
.md-math-block {
|
|
@@ -447,7 +1460,8 @@
|
|
|
447
1460
|
margin: 0;
|
|
448
1461
|
}
|
|
449
1462
|
|
|
450
|
-
.md-list li>.md-block
|
|
1463
|
+
.md-list li>.md-block,
|
|
1464
|
+
.md-list li>.md-code-block-container>.md-code-block {
|
|
451
1465
|
margin: 0;
|
|
452
1466
|
}
|
|
453
1467
|
|
|
@@ -460,25 +1474,97 @@
|
|
|
460
1474
|
position: relative;
|
|
461
1475
|
}
|
|
462
1476
|
|
|
1477
|
+
.md-list > li {
|
|
1478
|
+
min-height: 1lh;
|
|
1479
|
+
position: relative;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
463
1482
|
/*
|
|
464
1483
|
* The list marker is pulled into the gutter by markerKind (not `:first-child`),
|
|
465
1484
|
* because a nested item may carry its source indentation as a leading glue
|
|
466
1485
|
* before the marker. Gutter-positioning keeps the marker out of the inline
|
|
467
1486
|
* flow so toggling it never shifts the item's text horizontally.
|
|
468
1487
|
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
* the `-` with the rendered text.
|
|
1488
|
+
* The source box follows the first body line; the native reading marker is
|
|
1489
|
+
* never replaced or resized. Source symbols share the body's font baseline,
|
|
1490
|
+
* not a font-dependent optical centre of the painted asterisk.
|
|
473
1491
|
*/
|
|
474
1492
|
.md-list-item-active>.md-marker-listItemMarker {
|
|
475
1493
|
position: absolute;
|
|
476
1494
|
right: 100%;
|
|
477
1495
|
top: 0;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
.md-list-item-active>.md-marker-listItemMarker,
|
|
1499
|
+
.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker,
|
|
1500
|
+
.md-source-editing .md-list-gutter > .md-marker-listItemMarker {
|
|
478
1501
|
line-height: inherit;
|
|
1502
|
+
height: calc(1lh / var(--md-marker-font-scale));
|
|
1503
|
+
display: inline-flex;
|
|
1504
|
+
align-items: center;
|
|
1505
|
+
justify-content: flex-end;
|
|
1506
|
+
white-space: pre;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
/*
|
|
1510
|
+
* `display: inline-flex` above outranks the plain `.md-marker-hidden`
|
|
1511
|
+
* (`display: none`), so — exactly as for headings — re-hide the marker here for
|
|
1512
|
+
* the states that ask for it, otherwise the bullet could never be hidden.
|
|
1513
|
+
*/
|
|
1514
|
+
.md-list-item-active>.md-marker-listItemMarker.md-marker-hidden,
|
|
1515
|
+
.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker.md-marker-hidden {
|
|
1516
|
+
display: none;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
/* An unfinished marker still uses the gutter of its completed "marker + space" prefix. */
|
|
1520
|
+
.md-list-item-incomplete > .md-marker-listItemMarker::after,
|
|
1521
|
+
.md-list-item-incomplete > .md-list-gutter > .md-marker-listItemMarker::after {
|
|
1522
|
+
content: ' ';
|
|
479
1523
|
white-space: pre;
|
|
480
1524
|
}
|
|
481
1525
|
|
|
1526
|
+
.md-list-item-incomplete .md-marker-listItemMarker > .md-list-item-line-anchor {
|
|
1527
|
+
font-size: calc(1em / var(--md-marker-font-scale));
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.md-marker-listItemMarker:has(> .md-list-marker-symbol) {
|
|
1531
|
+
font-family: inherit;
|
|
1532
|
+
--md-marker-font-scale: 1;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
.md-list-marker-symbol {
|
|
1536
|
+
display: inline-block;
|
|
1537
|
+
flex: 0 0 1em;
|
|
1538
|
+
width: 1em;
|
|
1539
|
+
text-align: center;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
.md-marker-listItemMarker:has(> .md-list-marker-symbol) > :is(.md-ws-space, .md-ws-tab),
|
|
1543
|
+
.md-source-editing .md-list-continuation-separator {
|
|
1544
|
+
font-family: var(--md-marker-font-family);
|
|
1545
|
+
word-spacing: calc(0.5em - 1ch + var(--md-list-marker-reserve) / var(--md-list-marker-spaces));
|
|
1546
|
+
tab-size: calc(0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces));
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
.md-list-item-incomplete > .md-marker-listItemMarker:has(> .md-list-marker-symbol)::after,
|
|
1550
|
+
.md-list-item-incomplete > .md-list-gutter > .md-marker-listItemMarker:has(> .md-list-marker-symbol)::after {
|
|
1551
|
+
width: 0.5em;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/*
|
|
1555
|
+
* An inactive ordered item uses the browser's native `::marker`. Match its
|
|
1556
|
+
* typography when revealing the source marker so switching the active item
|
|
1557
|
+
* does not change the number's width or horizontal position: an ordered marker
|
|
1558
|
+
* opts out of the muted size step entirely, which also makes the `1lh`
|
|
1559
|
+
* compensation above a no-op for it.
|
|
1560
|
+
*/
|
|
1561
|
+
ol.md-list>.md-list-item-active>.md-marker-listItemMarker,
|
|
1562
|
+
ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker,
|
|
1563
|
+
.md-source-editing ol.md-list > li > .md-list-gutter > .md-marker-listItemMarker {
|
|
1564
|
+
font-family: inherit;
|
|
1565
|
+
--md-marker-font-scale: 1;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
482
1568
|
/*
|
|
483
1569
|
* A nested item's source indentation precedes its bullet (`␣␣- text`). The
|
|
484
1570
|
* indent glue and the bullet are mounted together in this gutter span, which is
|
|
@@ -507,8 +1593,66 @@
|
|
|
507
1593
|
justify-content: space-between;
|
|
508
1594
|
}
|
|
509
1595
|
|
|
1596
|
+
.md-source-editing .md-list-gutter {
|
|
1597
|
+
top: 0;
|
|
1598
|
+
height: 1lh;
|
|
1599
|
+
align-items: center;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
.md-source-editing .md-list-gutter > .md-glue-indent,
|
|
1603
|
+
.md-source-editing .md-list-continuation-indent {
|
|
1604
|
+
--md-source-indent-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em));
|
|
1605
|
+
--md-source-space-width: calc(var(--md-source-indent-width) / var(--md-indent-length));
|
|
1606
|
+
flex-basis: var(--md-source-indent-width);
|
|
1607
|
+
display: block;
|
|
1608
|
+
font-family: var(--md-marker-font-family);
|
|
1609
|
+
/* Stretch the source character itself so DOM ranges and selections fill the cell too. */
|
|
1610
|
+
word-spacing: calc(var(--md-source-space-width) - 1ch);
|
|
1611
|
+
tab-size: var(--md-source-space-width);
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
.md-source-editing .md-task-list-item > .md-list-gutter > .md-glue-indent {
|
|
1615
|
+
--md-source-indent-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em) / 2);
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
.md-source-editing .md-list-continuation-prefix {
|
|
1619
|
+
font-family: var(--md-marker-font-family);
|
|
1620
|
+
white-space: pre;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
.md-source-editing .md-list-continuation-prefix > span {
|
|
1624
|
+
display: inline;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
.md-source-editing .md-list-continuation-symbol {
|
|
1628
|
+
word-spacing: calc(1em - 1ch);
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
.md-source-editing .md-list-continuation-outside {
|
|
1632
|
+
margin-inline-start: calc((var(--md-list-level) - var(--md-list-source-indent)) * var(--md-list-indent-step, 2em) - 1.5em - var(--md-list-marker-reserve));
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
.md-source-editing .md-list-gutter > .md-marker-listItemMarker.md-marker-hidden {
|
|
1636
|
+
display: inline-flex;
|
|
1637
|
+
visibility: hidden;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
510
1640
|
.md-list-gutter>.md-marker-listItemMarker {
|
|
511
1641
|
flex: 0 0 auto;
|
|
1642
|
+
white-space: pre;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
/*
|
|
1646
|
+
* A nested item's gutter stays one body line tall. The marker has the same
|
|
1647
|
+
* compensated line box as a top-level marker, including when it hosts the
|
|
1648
|
+
* incomplete item's zero-source caret anchor.
|
|
1649
|
+
*
|
|
1650
|
+
* The gutter and source symbol carry body typography, so their baselines stay
|
|
1651
|
+
* aligned without measuring fonts or changing native reading markers.
|
|
1652
|
+
*/
|
|
1653
|
+
.md-list-item-active>.md-list-gutter {
|
|
1654
|
+
height: 1lh;
|
|
1655
|
+
align-items: center;
|
|
512
1656
|
}
|
|
513
1657
|
|
|
514
1658
|
|
|
@@ -523,6 +1667,20 @@
|
|
|
523
1667
|
white-space: pre;
|
|
524
1668
|
}
|
|
525
1669
|
|
|
1670
|
+
/*
|
|
1671
|
+
* A continuation-line indent inside a paragraph is source-only padding. When
|
|
1672
|
+
* inactive, the preceding soft-break newline already collapses to the single
|
|
1673
|
+
* rendered space Markdown requires; retaining the hidden indent would add the
|
|
1674
|
+
* tab/space run's width on top of it.
|
|
1675
|
+
*/
|
|
1676
|
+
.md-paragraph>.md-glue-indent.md-glue-hidden {
|
|
1677
|
+
display: none;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
.md-source-editing .md-paragraph>.md-glue-indent.md-glue-hidden {
|
|
1681
|
+
display: inline;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
526
1684
|
/*
|
|
527
1685
|
* A loose list item's later block (its second paragraph etc.) owns the source
|
|
528
1686
|
* continuation indent that precedes it as its `leadingTrivia`. Like a nested
|
|
@@ -532,12 +1690,14 @@
|
|
|
532
1690
|
* active (the footprint is identical in both states, so the text never shifts).
|
|
533
1691
|
*/
|
|
534
1692
|
.md-list li>.md-block,
|
|
535
|
-
.md-task-list-item>.md-block
|
|
1693
|
+
.md-task-list-item>.md-block,
|
|
1694
|
+
.md-list li>.md-code-block-container>.md-code-block {
|
|
536
1695
|
position: relative;
|
|
537
1696
|
}
|
|
538
1697
|
|
|
539
1698
|
.md-list li>.md-block>.md-glue-indent:first-child,
|
|
540
|
-
.md-task-list-item>.md-block>.md-glue-indent:first-child
|
|
1699
|
+
.md-task-list-item>.md-block>.md-glue-indent:first-child,
|
|
1700
|
+
.md-list li>.md-code-block-container>.md-code-block>.md-glue-indent:first-child {
|
|
541
1701
|
position: absolute;
|
|
542
1702
|
right: 100%;
|
|
543
1703
|
top: 0;
|
|
@@ -546,34 +1706,140 @@
|
|
|
546
1706
|
.md-task-list-item {
|
|
547
1707
|
list-style: none;
|
|
548
1708
|
position: relative;
|
|
549
|
-
/*
|
|
550
|
-
* Width of the checkbox / `[x]` source column. Single-sourced so the marker
|
|
551
|
-
* reservation on the first paragraph and the left indent of any following
|
|
552
|
-
* block (loose task items) stay in lockstep — keeping every block's text in
|
|
553
|
-
* one vertical column under the marker.
|
|
554
|
-
*/
|
|
555
|
-
--md-task-marker-width: 1.75em;
|
|
556
1709
|
}
|
|
557
1710
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
1711
|
+
.md-list > li {
|
|
1712
|
+
--md-list-label-reserve: 0em;
|
|
1713
|
+
--md-list-marker-reserve: var(--md-list-label-reserve);
|
|
1714
|
+
--md-list-source-padding: 0em;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
.md-list > .md-list-item-active {
|
|
1718
|
+
--md-list-source-padding: calc((var(--md-list-marker-spaces) - 1) * 0.5em);
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
.md-list > .md-task-list-item {
|
|
1722
|
+
--md-list-marker-reserve: 0em;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
.md-list-with-task-items > li:not(.md-empty-block) {
|
|
1726
|
+
--md-list-label-reserve: 0.5em;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
.md-editor .md-list > li > .md-paragraph {
|
|
1730
|
+
padding-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
.md-editor .md-list > li > .md-list-item-line-anchor {
|
|
1734
|
+
margin-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
.md-editor .md-list > li > .md-marker-listItemMarker {
|
|
1738
|
+
right: calc(100% - (var(--md-list-label-reserve) + var(--md-list-source-padding)) / var(--md-marker-font-scale));
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
.md-editor .md-list-gutter {
|
|
1742
|
+
right: calc(100% - var(--md-list-label-reserve) - var(--md-list-source-padding));
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
.md-source-editing .md-marker-listItemMarker {
|
|
1746
|
+
word-spacing: calc(var(--md-list-marker-reserve) / var(--md-marker-font-scale) / var(--md-list-marker-spaces));
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
/* Keep the mandatory separator's native width; each extra source space adds a body-sized half-em cell. */
|
|
1750
|
+
.md-source-editing .md-marker-listItemMarker > :is(.md-ws-space, .md-ws-tab) ~ :is(.md-ws-space, .md-ws-tab) {
|
|
1751
|
+
font-family: var(--md-marker-font-family);
|
|
1752
|
+
word-spacing: calc((0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces)) / var(--md-marker-font-scale) - 1ch);
|
|
1753
|
+
tab-size: calc((0.5em + var(--md-list-marker-reserve) / var(--md-list-marker-spaces)) / var(--md-marker-font-scale));
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
.md-task-separator {
|
|
1757
|
+
position: absolute;
|
|
1758
|
+
left: calc(var(--md-list-source-padding) - 1em + 1.5ch * var(--md-marker-font-scale));
|
|
1759
|
+
top: 0;
|
|
1760
|
+
font-family: var(--md-marker-font-family);
|
|
1761
|
+
white-space: pre;
|
|
1762
|
+
word-spacing: calc((1.5em - 1.5ch * var(--md-marker-font-scale)) / var(--md-separator-length) - 1ch);
|
|
1763
|
+
tab-size: calc((1.5em - 1.5ch * var(--md-marker-font-scale)) / var(--md-separator-length));
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
.md-task-list-item>.md-paragraph>.md-glue-taskListCheck {
|
|
1767
|
+
position: absolute;
|
|
1768
|
+
top: 0;
|
|
1769
|
+
font-family: var(--md-marker-font-family);
|
|
1770
|
+
font-size: calc(1em * var(--md-marker-font-scale));
|
|
1771
|
+
left: calc((var(--md-list-source-padding) - 1em) / var(--md-marker-font-scale) - 1.5ch);
|
|
1772
|
+
width: 3ch;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
.md-source-editing .md-task-list-item > .md-paragraph > .md-glue-taskListCheck {
|
|
1776
|
+
position: static;
|
|
566
1777
|
display: inline-block;
|
|
567
|
-
|
|
1778
|
+
margin-inline-start: calc((-1em - var(--md-list-label-reserve)) / var(--md-marker-font-scale) - 1.5ch);
|
|
568
1779
|
}
|
|
569
1780
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
1781
|
+
.md-source-editing .md-task-separator {
|
|
1782
|
+
position: static;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.md-source-editing .md-list li > .md-paragraph .md-list-continuation-gutter {
|
|
1786
|
+
position: absolute;
|
|
1787
|
+
right: calc(100% - var(--md-list-label-reserve) - var(--md-list-source-padding));
|
|
1788
|
+
top: auto;
|
|
1789
|
+
white-space: pre;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
.md-source-editing .md-list .md-code-block-container:has(> .md-code-list-source) {
|
|
1793
|
+
display: block;
|
|
1794
|
+
--md-list-prefix-width: calc(var(--md-list-source-indent) * var(--md-list-indent-step, 2em) + 1em + var(--md-list-marker-spaces) * 0.5em + var(--md-list-label-reserve));
|
|
1795
|
+
margin-inline-start: calc(var(--md-list-label-reserve) + var(--md-list-source-padding) - var(--md-list-prefix-width));
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
.md-source-editing .md-list .md-code-list-source {
|
|
1799
|
+
position: relative;
|
|
1800
|
+
font-size: inherit;
|
|
1801
|
+
border-inline-start-width: 0;
|
|
1802
|
+
padding-inline-start: var(--md-list-prefix-width);
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
.md-source-editing .md-list li > .md-code-block-container > .md-code-list-source > .md-list-continuation-prefix:first-child {
|
|
1806
|
+
right: calc(100% - var(--md-list-prefix-width));
|
|
1807
|
+
top: auto;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
.md-code-source-line {
|
|
1811
|
+
position: relative;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
.md-code-source-line > .md-list-continuation-prefix {
|
|
1815
|
+
position: absolute;
|
|
1816
|
+
right: 100%;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
.md-editor .md-task-list-item > .md-list-gutter {
|
|
1820
|
+
right: calc(100% - var(--md-list-source-padding));
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
.md-task-list-item > .md-list-gutter::after {
|
|
1824
|
+
content: '';
|
|
1825
|
+
font-family: var(--md-marker-font-family);
|
|
1826
|
+
font-size: calc(1em * var(--md-marker-font-scale));
|
|
1827
|
+
flex: 0 0 calc(1em / var(--md-marker-font-scale) + 1.5ch);
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
.md-task-list-item > .md-block + .md-block:not(.md-list) {
|
|
1831
|
+
padding-left: calc(var(--md-list-label-reserve) + var(--md-list-source-padding));
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
.md-task-list-item > .md-list {
|
|
1835
|
+
padding-left: var(--md-list-indent-step, 2em);
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
.md-task-list-item > .md-checkbox {
|
|
1839
|
+
font-family: var(--md-marker-font-family);
|
|
1840
|
+
font-size: calc(1em * var(--md-marker-font-scale));
|
|
1841
|
+
left: calc((var(--md-list-source-padding) - 1em) / var(--md-marker-font-scale) - 8px);
|
|
1842
|
+
top: calc((1lh / var(--md-marker-font-scale) - 16px) / 2);
|
|
577
1843
|
}
|
|
578
1844
|
|
|
579
1845
|
.md-checkbox {
|
|
@@ -588,6 +1854,7 @@
|
|
|
588
1854
|
position: absolute;
|
|
589
1855
|
left: 0;
|
|
590
1856
|
top: 0.25em;
|
|
1857
|
+
z-index: 1;
|
|
591
1858
|
cursor: pointer;
|
|
592
1859
|
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
593
1860
|
}
|
|
@@ -600,8 +1867,8 @@
|
|
|
600
1867
|
.md-checkbox:checked::after {
|
|
601
1868
|
content: '';
|
|
602
1869
|
position: absolute;
|
|
603
|
-
left:
|
|
604
|
-
top:
|
|
1870
|
+
left: 2.5px;
|
|
1871
|
+
top: -1px;
|
|
605
1872
|
width: 5px;
|
|
606
1873
|
height: 9px;
|
|
607
1874
|
border: solid white;
|
|
@@ -613,6 +1880,39 @@
|
|
|
613
1880
|
border-color: #888;
|
|
614
1881
|
}
|
|
615
1882
|
|
|
1883
|
+
/*
|
|
1884
|
+
* The rotating "broken rounded-square" progress ring for an inactive task item
|
|
1885
|
+
* whose text begins with the hidden `:running:` marker (see
|
|
1886
|
+
* `ListItemViewData.isRunning`). Rendered as a conic-gradient ring — masked so
|
|
1887
|
+
* only the ring (not its center) paints — with a transparent gap that spins,
|
|
1888
|
+
* reading as a segmented spinner rather than a checked/unchecked box.
|
|
1889
|
+
*/
|
|
1890
|
+
.md-checkbox-running,
|
|
1891
|
+
.md-checkbox-running:checked {
|
|
1892
|
+
padding: 2px;
|
|
1893
|
+
border: 0;
|
|
1894
|
+
border-radius: 4px;
|
|
1895
|
+
background: conic-gradient(
|
|
1896
|
+
transparent 0deg 42deg,
|
|
1897
|
+
#bbb 62deg 360deg
|
|
1898
|
+
);
|
|
1899
|
+
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
|
1900
|
+
-webkit-mask-composite: xor;
|
|
1901
|
+
mask-composite: exclude;
|
|
1902
|
+
animation: md-checkbox-spin 0.8s linear infinite;
|
|
1903
|
+
opacity: 1;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
@keyframes md-checkbox-spin {
|
|
1907
|
+
to {
|
|
1908
|
+
transform: rotate(360deg);
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
.md-checkbox-running:hover {
|
|
1913
|
+
border-color: transparent;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
616
1916
|
.md-checkbox:checked:hover {
|
|
617
1917
|
background-color: #3a73d4;
|
|
618
1918
|
border-color: #3a73d4;
|
|
@@ -623,14 +1923,66 @@
|
|
|
623
1923
|
opacity: 0.6;
|
|
624
1924
|
}
|
|
625
1925
|
|
|
1926
|
+
.md-checkbox-running:disabled {
|
|
1927
|
+
opacity: 1;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1931
|
+
.md-checkbox-running {
|
|
1932
|
+
animation: none !important;
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
/*
|
|
1937
|
+
* The `:running:` marker hidden from an inactive task item's rendered text
|
|
1938
|
+
* (see `TextViewData.hiddenPrefixLength`). It stays real, selectable source —
|
|
1939
|
+
* only visually hidden, per "Hidden markers remain real source" — so it takes
|
|
1940
|
+
* no layout space in either state.
|
|
1941
|
+
*/
|
|
1942
|
+
.md-runner-marker {
|
|
1943
|
+
display: none;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
626
1946
|
.md-cursor {
|
|
627
1947
|
position: absolute;
|
|
628
1948
|
width: 2px;
|
|
629
1949
|
background: var(--md-cursor-background, #000);
|
|
630
1950
|
pointer-events: none;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
/*
|
|
1954
|
+
* The painted caret is only shown while the editor is genuinely focused — focus
|
|
1955
|
+
* rests inside it and its window is focused, mirrored onto the root as
|
|
1956
|
+
* `.md-focused`. When unfocused, hide the caret element but keep its layout box
|
|
1957
|
+
* (so caret geometry, selection and comment anchoring are unchanged) and stop
|
|
1958
|
+
* the blink. Adding the animation on focus restarts it from 0% (a solid caret).
|
|
1959
|
+
*/
|
|
1960
|
+
.md-editor:not(.md-focused) .md-cursor {
|
|
1961
|
+
visibility: hidden;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
.md-editor.md-focused .md-cursor {
|
|
631
1965
|
animation: md-cursor-blink 1s step-end infinite;
|
|
632
1966
|
}
|
|
633
1967
|
|
|
1968
|
+
/*
|
|
1969
|
+
* Read-only mode retains the logical caret for selection and comment anchoring.
|
|
1970
|
+
* Hide only its painted element so unlocking can restore it in place.
|
|
1971
|
+
*/
|
|
1972
|
+
.md-editor.md-readonly .md-cursor {
|
|
1973
|
+
visibility: hidden;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
.md-editor.md-readonly-editing-attempt {
|
|
1977
|
+
animation: md-readonly-editing-attempt 300ms ease-out;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
@keyframes md-readonly-editing-attempt {
|
|
1981
|
+
50% {
|
|
1982
|
+
box-shadow: inset 0 0 0 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
|
|
634
1986
|
@keyframes md-cursor-blink {
|
|
635
1987
|
|
|
636
1988
|
0%,
|
|
@@ -641,4 +1993,189 @@
|
|
|
641
1993
|
50% {
|
|
642
1994
|
opacity: 0;
|
|
643
1995
|
}
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
/*
|
|
1999
|
+
* Edit / read-only lock toggle.
|
|
2000
|
+
*
|
|
2001
|
+
* The sticky overlay never changes text flow or the symmetric content margins.
|
|
2002
|
+
* Narrow margins let the control overlap content rather than reserving a rail.
|
|
2003
|
+
* Colors use local `--md-readonly-*` custom
|
|
2004
|
+
* properties with literal fallbacks so this base file stays theme-agnostic
|
|
2005
|
+
* (themes may override them).
|
|
2006
|
+
*/
|
|
2007
|
+
.md-readonly-toggle-host {
|
|
2008
|
+
position: sticky;
|
|
2009
|
+
top: var(--md-readonly-toggle-inset);
|
|
2010
|
+
height: 0;
|
|
2011
|
+
z-index: 10;
|
|
2012
|
+
pointer-events: none;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
.md-readonly-toggle {
|
|
2016
|
+
position: absolute;
|
|
2017
|
+
top: 4px;
|
|
2018
|
+
right: var(--md-readonly-toggle-inset);
|
|
2019
|
+
pointer-events: auto;
|
|
2020
|
+
display: inline-grid;
|
|
2021
|
+
grid-template-columns: repeat(3, 24px);
|
|
2022
|
+
align-items: center;
|
|
2023
|
+
justify-items: center;
|
|
2024
|
+
gap: 2px;
|
|
2025
|
+
box-sizing: border-box;
|
|
2026
|
+
width: var(--md-readonly-toggle-width);
|
|
2027
|
+
height: var(--md-readonly-toggle-height);
|
|
2028
|
+
padding: 3px;
|
|
2029
|
+
overflow: hidden;
|
|
2030
|
+
direction: ltr;
|
|
2031
|
+
appearance: none;
|
|
2032
|
+
border-radius: 999px;
|
|
2033
|
+
border: 1px solid var(--md-readonly-border, #b8b8b8);
|
|
2034
|
+
background: var(--md-readonly-background, #f3f3f3);
|
|
2035
|
+
color: var(--md-readonly-foreground, #444444);
|
|
2036
|
+
font-size: 16px;
|
|
2037
|
+
line-height: 1;
|
|
2038
|
+
cursor: pointer;
|
|
2039
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
2040
|
+
transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
.md-readonly-toggle::after {
|
|
2044
|
+
content: '';
|
|
2045
|
+
position: absolute;
|
|
2046
|
+
z-index: 2;
|
|
2047
|
+
top: -8px;
|
|
2048
|
+
bottom: -8px;
|
|
2049
|
+
left: -30px;
|
|
2050
|
+
width: 24px;
|
|
2051
|
+
background: linear-gradient(90deg,
|
|
2052
|
+
transparent,
|
|
2053
|
+
var(--md-readonly-shine-edge, rgba(255, 255, 255, 0.16)) 24%,
|
|
2054
|
+
var(--md-readonly-shine, #ffffff) 50%,
|
|
2055
|
+
var(--md-readonly-shine-edge, rgba(255, 255, 255, 0.16)) 76%,
|
|
2056
|
+
transparent);
|
|
2057
|
+
box-shadow: 0 0 8px 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
|
|
2058
|
+
opacity: 0;
|
|
2059
|
+
pointer-events: none;
|
|
2060
|
+
transform: skewX(-20deg);
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
.md-readonly-toggle.md-readonly-toggle-shine::after {
|
|
2064
|
+
animation: md-readonly-toggle-shine 2s linear;
|
|
2065
|
+
will-change: transform, opacity;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
@keyframes md-readonly-toggle-shine {
|
|
2069
|
+
0% {
|
|
2070
|
+
opacity: 0;
|
|
2071
|
+
transform: translateX(0) skewX(-20deg);
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
12%,
|
|
2075
|
+
88% {
|
|
2076
|
+
opacity: 1;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
100% {
|
|
2080
|
+
opacity: 0;
|
|
2081
|
+
transform: translateX(122px) skewX(-20deg);
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
.md-readonly-toggle:hover {
|
|
2086
|
+
border-color: var(--md-readonly-border-hover, #8d8d8d);
|
|
2087
|
+
background: var(--md-readonly-background-hover, #e9e9e9);
|
|
2088
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.1);
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
.md-readonly-toggle:focus-visible {
|
|
2092
|
+
outline: 2px solid var(--md-readonly-accent, #4c8bf5);
|
|
2093
|
+
outline-offset: 1px;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
.md-readonly-toggle .md-readonly-toggle-indicator {
|
|
2097
|
+
position: absolute;
|
|
2098
|
+
top: 50%;
|
|
2099
|
+
left: 3px;
|
|
2100
|
+
width: 24px;
|
|
2101
|
+
height: 24px;
|
|
2102
|
+
border-radius: 50%;
|
|
2103
|
+
background: var(--md-readonly-accent, #4c8bf5);
|
|
2104
|
+
box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
|
|
2105
|
+
transform: translate(26px, -50%);
|
|
2106
|
+
transition: background-color 0.12s ease, transform 0.16s ease;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
.md-readonly-toggle .md-readonly-toggle-icon {
|
|
2110
|
+
position: relative;
|
|
2111
|
+
z-index: 1;
|
|
2112
|
+
display: block;
|
|
2113
|
+
width: 16px;
|
|
2114
|
+
height: 16px;
|
|
2115
|
+
color: var(--md-readonly-foreground, #444444);
|
|
2116
|
+
opacity: 0.62;
|
|
2117
|
+
pointer-events: none;
|
|
2118
|
+
transition: color 0.12s ease, opacity 0.12s ease;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
.md-readonly-toggle:not(.md-readonly-toggle-locked) .md-readonly-toggle-icon-editing,
|
|
2122
|
+
.md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
|
|
2123
|
+
color: var(--md-readonly-accent-foreground, #ffffff);
|
|
2124
|
+
opacity: 1;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
.md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-indicator {
|
|
2128
|
+
transform: translate(0, -50%);
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2132
|
+
|
|
2133
|
+
.md-editor.md-readonly-editing-attempt,
|
|
2134
|
+
.md-readonly-toggle,
|
|
2135
|
+
.md-readonly-toggle .md-readonly-toggle-indicator,
|
|
2136
|
+
.md-readonly-toggle .md-readonly-toggle-icon,
|
|
2137
|
+
.md-readonly-toggle.md-readonly-toggle-shine::after {
|
|
2138
|
+
animation: none;
|
|
2139
|
+
transition: none;
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
@media (forced-colors: active) {
|
|
2144
|
+
.md-readonly-toggle {
|
|
2145
|
+
forced-color-adjust: none;
|
|
2146
|
+
border-color: ButtonText;
|
|
2147
|
+
background: ButtonFace;
|
|
2148
|
+
color: ButtonText;
|
|
2149
|
+
box-shadow: none;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.md-readonly-toggle::after {
|
|
2153
|
+
display: none;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
.md-readonly-toggle:hover {
|
|
2157
|
+
border-color: Highlight;
|
|
2158
|
+
background: ButtonFace;
|
|
2159
|
+
box-shadow: none;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
.md-readonly-toggle:focus-visible {
|
|
2163
|
+
outline-color: Highlight;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
.md-readonly-toggle .md-readonly-toggle-indicator {
|
|
2167
|
+
background: Highlight;
|
|
2168
|
+
box-shadow: none;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
.md-readonly-toggle .md-readonly-toggle-icon {
|
|
2172
|
+
color: ButtonText;
|
|
2173
|
+
opacity: 1;
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
.md-readonly-toggle:not(.md-readonly-toggle-locked):not(.md-readonly-toggle-source) .md-readonly-toggle-icon-editing,
|
|
2177
|
+
.md-readonly-toggle.md-readonly-toggle-source .md-readonly-toggle-icon-source,
|
|
2178
|
+
.md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
|
|
2179
|
+
color: HighlightText;
|
|
2180
|
+
}
|
|
644
2181
|
}
|