44 lines
1.3 KiB
CSS
44 lines
1.3 KiB
CSS
.ProseMirror {
|
|
@apply text-slate-600 break-words whitespace-pre-wrap prose prose-sm;
|
|
/*
|
|
* NOTE: Disabling overflow anchor fixes a code cell scrolling bug
|
|
* that happens in Chrome:
|
|
* If you have a code cell with `BottomResizer`, resize the code cell
|
|
* so that it has a scrollbar, scroll at the bottom and start deleting
|
|
* new lines, the outer scrollbar of ProseMirror starts moving with
|
|
* every deleted new-line which then moves the whole document page.
|
|
*
|
|
* I'm currently not sure how to fix the bug in any other way. Maybe
|
|
* some enclosing elemens have their height incorrectly calculated?
|
|
*
|
|
* More info and solution might be found here:
|
|
* - https://discuss.prosemirror.net/t/undesired-scrolling-on-updatestate/2066
|
|
* - https://github.com/ProseMirror/prosemirror/issues/933
|
|
*/
|
|
overflow-anchor: none;
|
|
}
|
|
|
|
.ProseMirror:focus {
|
|
@apply outline-none;
|
|
}
|
|
|
|
.ProseMirror p {
|
|
@apply mx-0 my-0 py-0 leading-6 whitespace-pre-wrap break-words;
|
|
}
|
|
|
|
.ProseMirror span {
|
|
@apply whitespace-pre-wrap break-words;
|
|
}
|
|
|
|
/* Placeholder (on every new line) */
|
|
.ProseMirror p.is-empty::before {
|
|
@apply float-left h-0 select-none text-slate-300;
|
|
content: attr(data-placeholder);
|
|
}
|
|
|
|
@keyframes ProseMirror-cursor-blink {
|
|
to {
|
|
visibility: hidden;
|
|
}
|
|
}
|