fix: drop the trailing-break line after an inline atom
A paragraph holding an image rendered a line taller than it does anywhere else: under white-space: pre-wrap the browser already shows the last line, so ProseMirror's hack BR adds an empty one. The hack is kept where it earns its keep — after a real break it carries the caret onto the empty line, and in an empty block it is the only line box there is.
This commit is contained in:
1 parent
58eadc3a2e
commit
c34fb4312a
1 file changed
+7
@@ -623,6 +623,13 @@
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* After an inline atom ProseMirror's trailing-break BR adds a line the block has not
|
||||
got, so a paragraph holding an image renders one too tall. Kept after a real BR
|
||||
(it carries the caret onto the empty line) and in an empty block (its only line). */
|
||||
.paper .tiptap :not(br) + br.ProseMirror-trailingBreak {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Empty block fix: a paragraph/heading/li-paragraph holding only the ProseMirror
|
||||
trailing-break BR would render the inline ¶ on a second line, doubling its height.
|
||||
Pull ::after out of flow. Applied always so the reserved ¶ stays zero-height. */
|
||||
|
||||
Reference in new issue
Block a user