diff --git a/app/src/assets/scss/component/_typography.scss b/app/src/assets/scss/component/_typography.scss index 9c80da97e..7ed2ed23d 100644 --- a/app/src/assets/scss/component/_typography.scss +++ b/app/src/assets/scss/component/_typography.scss @@ -305,18 +305,16 @@ color: var(--b3-theme-on-surface); margin-top: -4px; align-self: center; + margin-left: 1em; + opacity: 0; + transition: var(--b3-transition); + line-height: calc(1.625 / 0.85); } .protyle-icon { opacity: 0; transition: var(--b3-transition); } - - .protyle-action__language { - margin-left: 1em; - opacity: 0; - transition: var(--b3-transition); - } } &:hover .protyle-icon, diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index 9184b721f..bcdd8ca2e 100644 --- a/app/src/assets/scss/protyle/_wysiwyg.scss +++ b/app/src/assets/scss/protyle/_wysiwyg.scss @@ -116,12 +116,15 @@ padding: 0; display: flex; flex-direction: column; + min-height: calc(1.625em + 8px); &::before { content: ""; position: absolute; border-left: .5px solid var(--b3-theme-background-light); left: 17px; + height: calc(100% - 1em * 1.625 - 12px); + top: calc(1em * 1.625 + 12px); } &:hover::before { @@ -174,6 +177,16 @@ display: flex; align-items: center; word-break: keep-all; + height: calc(1.625em + 8px); + line-height: calc(1.625em + 8px); + + & ~ [data-type="NodeHeading"] { + line-height: 1em; + + & > [spellcheck] { + min-height: 1em; + } + } &::after { content: ""; diff --git a/app/src/util/assets.ts b/app/src/util/assets.ts index 6300b29cc..9d66f64f0 100644 --- a/app/src/util/assets.ts +++ b/app/src/util/assets.ts @@ -319,14 +319,8 @@ export const setInlineStyle = async (set = true) => { } style += `\n:root{--b3-font-size-editor:${window.siyuan.config.editor.fontSize}px} .b3-typography code:not(.hljs), .protyle-wysiwyg span[data-type~=code] { font-variant-ligatures: ${window.siyuan.config.editor.codeLigatures ? "normal" : "none"} } -.li > .protyle-action {height:${height + 8}px;line-height: ${height + 8}px} -/* 列表项后的内容和列表项对齐 https://github.com/siyuan-note/siyuan/issues/2803 */ -.protyle-wysiwyg [data-node-id].li > .protyle-action ~ div {line-height:${height}px} -.protyle-wysiwyg [data-node-id].li > .protyle-action ~ div > [spellcheck] {min-height:${height}px} -.protyle-wysiwyg [data-node-id].li::before {height: calc(100% - ${height + 12}px);top:${(height + 12)}px} ${rtlCSS} .protyle-wysiwyg [data-node-id] {${window.siyuan.config.editor.justify ? " text-align: justify;" : ""}} -.protyle-wysiwyg .li {min-height:${height + 8}px} .protyle-gutters button svg {height:${height}px}`; if (window.siyuan.config.editor.fontFamily) { style += `\n.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title {font-family: "Emojis Additional", "Emojis Reset", "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family)}`;