Vanessa 2025-01-29 20:48:56 +08:00
parent d9d48273fb
commit 7f1db1fefd
3 changed files with 25 additions and 48 deletions

View File

@ -153,9 +153,7 @@
h5,
h6 {
padding: 4px;
margin: 4px 0;
font-weight: 600;
line-height: 1.25;
margin: 2px 0;
}
.h1,
@ -163,28 +161,23 @@
.h3,
.h4,
.h5,
.h6 {
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 600;
&[data-node-id] [spellcheck] {
min-height: 1.625em;
}
}
h1 {
padding: .3em 4px;
font-size: 1.75em;
line-height: 1.25;
}
h1,
.h1 {
font-size: 1.75em;
}
h2 {
padding: .3em 4px;
font-size: 1.55em;
}
h2,
.h2 {
font-size: 1.55em;
}
@ -318,8 +311,7 @@
}
.protyle-action__language {
position: absolute;
left: 1em;
margin-left: 1em;
opacity: 0;
transition: var(--b3-transition);
}

View File

@ -166,6 +166,17 @@
align-items: center;
word-break: keep-all;
// https://github.com/siyuan-note/siyuan/issues/2803
& ~ .h1,
& ~ .h2,
& ~ .h3,
& ~ .h4,
& ~ .h5,
& ~ .h6 {
padding-top: 0;
padding-bottom: 0;
}
&::after {
content: "";
position: absolute;
@ -185,17 +196,6 @@
&--order::after {
border-radius: var(--b3-border-radius);
}
~ .h1,
~ .h2,
~ .h3,
~ .h4,
~ .h5,
~ .h6 {
[spellcheck] {
min-height: unset;
}
}
}
}
@ -231,20 +231,6 @@
position: initial;
margin-left: 4px;
}
/* 选中块的高亮覆盖 margin */
&> .protyle-wysiwyg--select:not(.sb)::after,
&> .protyle-wysiwyg--hl:not(.sb)::after{
height: calc(100% + 4px);
top: -2px;
}
/* 选中块的高亮覆盖 border 和 margin */
&> .protyle-wysiwyg--select.render-node[data-type="NodeBlockQueryEmbed"]::after,
&> .protyle-wysiwyg--hl.render-node[data-type="NodeBlockQueryEmbed"]::after{
height: calc(100% + 6px);
top: -3px;
}
}
}

View File

@ -288,8 +288,7 @@ export const setInlineStyle = async (set = true) => {
}`;
}
}
style += `\n:root{--b3-font-size-editor:${window.siyuan.config.editor.fontSize}px}
.b3-typography, .protyle-wysiwyg, .protyle-title {font-size:${window.siyuan.config.editor.fontSize}px !important}
style += `.b3-typography, .protyle-wysiwyg, .protyle-title {font-size:${window.siyuan.config.editor.fontSize}px !important}
.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}
.protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h1, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h2, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h3, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h4, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h5, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h6 {line-height:${height + 8}px;}