-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Improve setInlineStyle #15193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Improve setInlineStyle #15193
Conversation
麻烦描述一下改动 |
color: var(--b3-theme-on-surface-light); | ||
height: calc(var(--b3-font-size-editor) * 1.625); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
height 改为通过已有的 --b3-font-size-editor 计算,用 CSS 替代 JS
@@ -170,7 +170,6 @@ export const initAssets = () => { | |||
}; | |||
|
|||
export const setInlineStyle = async (set = true) => { | |||
const height = Math.floor(window.siyuan.config.editor.fontSize * 1.625); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
height 改为通过已有的 --b3-font-size-editor 计算,用 CSS 替代 JS
if (isWin11Browser) { | ||
style = `@font-face { | ||
} else if (await isWin11()) { | ||
// Win11 Browser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改多余的分支逻辑
if (window.siyuan.config.editor.rtl) { | ||
rtlCSS = `.protyle-title__input, | ||
style += ` | ||
.protyle-title__input, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去除 rtlCSS 变量,直接修改 style 变量
No description provided.