Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/17384

Vanessa7e241fd71b1d
diff --git a/app/appearance/themes/daylight/theme.css b/app/appearance/themes/daylight/theme.css
index 480c7269fc..dff915bf73 100644
--- a/app/appearance/themes/daylight/theme.css
+++ b/app/appearance/themes/daylight/theme.css
@@ -32,10 +32,12 @@
--b3-font-family-kbd: var(--b3-font-family-protyle);
--b3-font-size: 14px;
- /* 背景色 */
+ /* 背景 */
--b3-body-background: #EBECF0;
--b3-body-background-hl-opacity: 0.24;
--b3-body-background-hl: 219, 86%, 57%;
+ --b3-layout-space: 4px;
+ --b3-layout-space-margin: -4px;
/* 顶部工具栏 */
--b3-toolbar-color: var(--b3-theme-on-surface);
diff --git a/app/appearance/themes/midnight/theme.css b/app/appearance/themes/midnight/theme.css
index 038a9baf8a..29075a75b2 100644
--- a/app/appearance/themes/midnight/theme.css
+++ b/app/appearance/themes/midnight/theme.css
@@ -31,10 +31,12 @@
--b3-font-family-kbd: var(--b3-font-family-protyle);
--b3-font-size: 14px;
- /* 背景色 */
+ /* 背景 */
--b3-body-background: #2e3236;
--b3-body-background-hl-opacity: 0.24;
--b3-body-background-hl: 219, 86%, 57%;
+ --b3-layout-space: 4px;
+ --b3-layout-space-margin: -4px;
/* 顶部工具栏 */
--b3-toolbar-color: var(--b3-theme-on-surface);
diff --git a/app/src/assets/scss/business/_layout.scss b/app/src/assets/scss/business/_layout.scss
index 9a0d2f75bb..859eb4d831 100644
--- a/app/src/assets/scss/business/_layout.scss
+++ b/app/src/assets/scss/business/_layout.scss
@@ -22,18 +22,18 @@
}
&__dockl + .layout__resize {
- margin: 0 0 0 -4px;
- width: 4px;
+ margin: 0 0 0 var(--b3-layout-space-margin);
+ width: var(--b3-layout-space);
}
&__center + .layout__resize {
- margin: 0 -4px 0 0;
- width: 4px;
+ margin: 0 var(--b3-layout-space-margin) 0 0;
+ width: var(--b3-layout-space);
}
& > .layout__resize {
- margin: 0 0 -4px 0;
- height: 4px;
+ margin: 0 0 var(--b3-layout-space-margin) 0;
+ height: var(--b3-layout-space);
}
&__dockl + .layout__resize:after, &__center + .layout__resize:after, & > .layout__resize:after {
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index f108416ace..d4e68d3d65 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -705,13 +705,13 @@ export class Dock {
// dock 显示
if (this.position === "Left") {
this.layout.element.style.width = this.getMaxSize() + "px";
- this.layout.element.style.marginRight = "4px";
+ this.layout.element.style.marginRight = "var(--b3-layout-space)";
} else if (this.position === "Right") {
this.layout.element.style.width = this.getMaxSize() + "px";
- this.layout.element.style.marginLeft = "4px";
+ this.layout.element.style.marginLeft = "var(--b3-layout-space)";
} else {
this.layout.element.style.height = this.getMaxSize() + "px";
- this.layout.element.style.marginTop = "4px";
+ this.layout.element.style.marginTop = "var(--b3-layout-space)";
}
if ((type === "graph" || type === "globalGraph") && this.layout.element.querySelector(".fullscreen")) {
document.getElementById("drag")?.classList.add("fn__hidden");