File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ BASIC STYLES
4141}
4242
4343.bn-inline-content {
44- width : 100% ;
4544 /* Ensure pre-wrap even when a parent node view wrapper (e.g. tiptap's
4645 NodeViewWrapper) resets white-space to "normal". Without this, browsers
4746 normalize trailing spaces to NBSP on input, which causes ProseMirror to
@@ -552,15 +551,13 @@ NESTED BLOCKS
552551}
553552
554553/* PLACEHOLDERS*/
555- .bn-inline-content : has (> .ProseMirror-trailingBreak : only-child ): before {
556- /*float: left; */
557- pointer-events : none;
558- height : 0 ;
559- /* width: 0; */
560- position : absolute;
554+ .bn-block-content : has (.ProseMirror-trailingBreak : only-child ): after {
561555 font-style : italic;
556+ /* Removes text cursor offset. */
557+ margin-inline : -2px ;
558+ pointer-events : none;
559+ max-width : 100% ;
562560}
563- /* TODO: should this be here? */
564561
565562/* TEXT COLORS */
566563[data-style-type = "textColor" ][data-value = "gray" ],
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export const PlaceholderExtension = createExtension(
4141 const styleSheet = styleEl . sheet ! ;
4242
4343 const getSelector = ( additionalSelectors = "" ) =>
44- `.${ uniqueEditorSelector } .bn-block-content${ additionalSelectors } .bn-inline-content :has(> .ProseMirror-trailingBreak:only-child):before ` ;
44+ `.${ uniqueEditorSelector } .bn-block-content${ additionalSelectors } :has(.ProseMirror-trailingBreak:only-child):after ` ;
4545
4646 try {
4747 // FIXME: the names "default" and "emptyDocument" are hardcoded
Original file line number Diff line number Diff line change 120120}
121121
122122/* Placeholder styling */
123- .bn-inline -content : has (> .ProseMirror-trailingBreak ) : before {
123+ .bn-block -content : has (.ProseMirror-trailingBreak : only-child ) : after {
124124 color : var (--bn-colors-side-menu );
125125}
126126
You can’t perform that action at this time.
0 commit comments