mirror of
https://github.com/langgenius/dify.git
synced 2025-12-19 14:19:28 +00:00
fix(theme): make sticky headers opaque in dark mode (Monaco sticky sc… (#29826)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
@import '../../themes/dark.css';
|
||||
@import "../../themes/manual-light.css";
|
||||
@import "../../themes/manual-dark.css";
|
||||
@import "./monaco-sticky-fix.css";
|
||||
|
||||
@import "../components/base/button/index.css";
|
||||
@import "../components/base/action-button/index.css";
|
||||
|
||||
16
web/app/styles/monaco-sticky-fix.css
Normal file
16
web/app/styles/monaco-sticky-fix.css
Normal file
@@ -0,0 +1,16 @@
|
||||
/* Ensures Monaco sticky header and other sticky headers remain visible in dark mode */
|
||||
html[data-theme="dark"] .monaco-editor .sticky-widget {
|
||||
background-color: var(--color-components-sticky-header-bg) !important;
|
||||
border-bottom: 1px solid var(--color-components-sticky-header-border) !important;
|
||||
box-shadow: var(--vscode-editorStickyScroll-shadow) 0 4px 2px -2px !important;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .monaco-editor .sticky-line-content:hover {
|
||||
background-color: var(--color-components-sticky-header-bg-hover) !important;
|
||||
}
|
||||
|
||||
/* Fallback: any app sticky header using input-bg variables should use the sticky header bg when sticky */
|
||||
html[data-theme="dark"] .sticky, html[data-theme="dark"] .is-sticky {
|
||||
background-color: var(--color-components-sticky-header-bg) !important;
|
||||
border-bottom: 1px solid var(--color-components-sticky-header-border) !important;
|
||||
}
|
||||
@@ -6,6 +6,18 @@ html[data-theme="dark"] {
|
||||
--color-components-input-bg-active: rgb(255 255 255 / 0.05);
|
||||
--color-components-input-border-active: #747481;
|
||||
--color-components-input-border-destructive: #f97066;
|
||||
|
||||
/* Sticky header / Monaco editor sticky scroll colors (dark mode) */
|
||||
/* Use solid panel background to ensure visibility when elements become sticky */
|
||||
--color-components-sticky-header-bg: var(--color-components-panel-bg);
|
||||
--color-components-sticky-header-bg-hover: var(--color-components-panel-on-panel-item-bg-hover);
|
||||
--color-components-sticky-header-border: var(--color-components-panel-border);
|
||||
|
||||
/* Override Monaco/VSCode CSS variables for sticky scroll so the sticky header is opaque */
|
||||
--vscode-editorStickyScroll-background: var(--color-components-sticky-header-bg);
|
||||
--vscode-editorStickyScrollHover-background: var(--color-components-sticky-header-bg-hover);
|
||||
--vscode-editorStickyScroll-border: var(--color-components-sticky-header-border);
|
||||
--vscode-editorStickyScroll-shadow: rgba(0, 0, 0, 0.6);
|
||||
--color-components-input-text-filled: #f4f4f5;
|
||||
--color-components-input-bg-destructive: rgb(255 255 255 / 0.01);
|
||||
--color-components-input-bg-disabled: rgb(255 255 255 / 0.03);
|
||||
|
||||
Reference in New Issue
Block a user