@vscode/markdown-editor 0.0.2-29 → 0.0.2-30
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/package.json +1 -1
- package/src/view/editor.css +23 -0
package/package.json
CHANGED
package/src/view/editor.css
CHANGED
|
@@ -75,6 +75,29 @@
|
|
|
75
75
|
box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/*
|
|
79
|
+
* The whole-empty-document case. Markdown has no empty-paragraph node, so a
|
|
80
|
+
* document with no content parses to a single empty paragraph (see
|
|
81
|
+
* `_ensureBlocks` in the parser) which renders as a childless `<p>` of zero
|
|
82
|
+
* height. Give it one line's height so the editor presents an intentional,
|
|
83
|
+
* clickable empty editing surface — and so typing the first character causes no
|
|
84
|
+
* layout shift (a filled line is also one `lh` tall).
|
|
85
|
+
*/
|
|
86
|
+
.md-paragraph:empty {
|
|
87
|
+
min-height: 1lh;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
* ...and never paint the active-block card over that zero-content line: with no
|
|
92
|
+
* text to size it, the card's background + 8px box-shadow glow would show up as
|
|
93
|
+
* a stray gray bar. The two extra classes outrank the base `.md-block-active`
|
|
94
|
+
* rule above in every theme (themes only remap `--md-block-active-background`).
|
|
95
|
+
*/
|
|
96
|
+
.md-paragraph:empty.md-block-active {
|
|
97
|
+
background: transparent;
|
|
98
|
+
box-shadow: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
78
101
|
/*
|
|
79
102
|
* Cursor mirrors the same open affordance as the underline below: the anchor's
|
|
80
103
|
* pointer cursor appears exactly when a click would open the link. An inactive
|