tiptap: fix title placeholer style

This commit is contained in:
fantasticit 2022-06-03 14:17:00 +08:00
parent 4380617601
commit 0510303c7c
1 changed files with 6 additions and 3 deletions

View File

@ -1,17 +1,20 @@
.ProseMirror { .ProseMirror {
.title { .node-title {
position: relative;
margin: 12px 0 24px; margin: 12px 0 24px;
font-size: 2.5em; font-size: 2.5em;
font-weight: bold; font-weight: bold;
color: var(--semi-color-text-0); color: var(--semi-color-text-0);
border-bottom: 1px solid var(--semi-color-border); border-bottom: 1px solid var(--semi-color-border);
&.is-empty::before { &::before {
float: left; position: absolute;
bottom: 0;
height: 0; height: 0;
color: #aaa; color: #aaa;
pointer-events: none; pointer-events: none;
content: attr(data-placeholder); content: attr(data-placeholder);
transform: translateY(-1.7em);
} }
} }
} }