From 4ca77aae219024c232eb004aa18351a74a73d97b Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Mon, 8 Jun 2026 00:02:23 -0700 Subject: [PATCH] Compact toolbar height when TOC panel is visible Align both the TOC header and markdown toolbar to a consistent 40px height with a shared bottom border when the TOC panel is open, removing redundant borders and reducing visual clutter. --- src/renderer/src/assets/rich-markdown-editor.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/renderer/src/assets/rich-markdown-editor.css b/src/renderer/src/assets/rich-markdown-editor.css index 7f85b880f89..6eec24e2ece 100644 --- a/src/renderer/src/assets/rich-markdown-editor.css +++ b/src/renderer/src/assets/rich-markdown-editor.css @@ -30,6 +30,19 @@ background: color-mix(in srgb, var(--background) 84%, transparent); } +/* Why: the TOC header is a fixed 40px chrome row; compact the toolbar to match when both are visible. */ +.rich-markdown-editor-layout:has(.markdown-toc-panel) .markdown-toc-header, +.rich-markdown-editor-layout:has(.markdown-toc-panel) .rich-markdown-editor-toolbar { + min-height: 40px; + box-sizing: border-box; + border-bottom: none; + box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--border) 72%, transparent); +} + +.rich-markdown-editor-layout:has(.markdown-toc-panel) .rich-markdown-editor-toolbar { + padding-block: 6px; +} + .rich-markdown-toolbar-button { display: inline-flex; align-items: center;