mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
🎨 font size
This commit is contained in:
parent
aa22b4892a
commit
713aba12e2
6 changed files with 36 additions and 15 deletions
|
|
@ -132,6 +132,8 @@ export const lineNumberRender = (block: HTMLElement) => {
|
|||
return;
|
||||
}
|
||||
block.classList.add("protyle-linenumber");
|
||||
// clientHeight 总是取的整数
|
||||
block.parentElement.style.lineHeight = `${((parseInt(block.parentElement.style.fontSize) || window.siyuan.config.editor.fontSize) * 1.625 * 0.85).toFixed(0)}px`;
|
||||
const lineNumberTemp = document.createElement("div");
|
||||
lineNumberTemp.className = "hljs protyle-linenumber";
|
||||
lineNumberTemp.setAttribute("style", `padding-top:0 !important;padding-bottom:0 !important;min-height:auto !important;white-space:${block.style.whiteSpace};word-break:${block.style.wordBreak};font-variant-ligatures:${block.style.fontVariantLigatures};`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue