style: 添加编辑器字号的基准 CSS 变量 --b3-font-size-editor 供主题或插件使用
比如用 CSS 实现界面字号与编辑器字号同步调整 body > #dockBottom, body > .fn__flex-1 { font-size: calc(var(--b3-font-size-editor) - 2px); }
This commit is contained in:
parent
abd5840e15
commit
b8d63b2706
1 changed files with 2 additions and 1 deletions
|
@ -271,7 +271,8 @@ export const setInlineStyle = async (set = true) => {
|
|||
}`;
|
||||
}
|
||||
}
|
||||
style += `.b3-typography, .protyle-wysiwyg, .protyle-title {font-size:${window.siyuan.config.editor.fontSize}px !important}
|
||||
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}
|
||||
.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;}
|
||||
|
|
Loading…
Add table
Reference in a new issue