From 2281ca39ea0ae8a39c80a38e39c6e96f60de2d05 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 13 May 2026 21:40:49 -0400 Subject: [PATCH] Hide drag handle when printing, adjust heading actions for handle gutter Co-Authored-By: Claude Opus 4.7 --- shared/editor/components/Styles.ts | 10 +++++----- shared/styles/globals.ts | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts index 9202a6da8b..a38a72bc9c 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts @@ -1110,8 +1110,8 @@ h6:not(.placeholder)::before { .heading-anchor, .heading-fold { display: inline-block; - color: ${props.theme.text}; - opacity: .75; + color: ${props.theme.textTertiary}; + opacity: 1; cursor: var(--pointer); background: none; outline: none; @@ -1128,7 +1128,7 @@ h6:not(.placeholder)::before { &:focus, &:hover { - opacity: 1; + color: ${props.theme.text}; } } @@ -1146,7 +1146,7 @@ h6:not(.placeholder)::before { opacity: 0; user-select: none; background: ${props.theme.background}; - margin-left: -26px; + margin-left: -52px; flex-direction: row; display: none; position: absolute; @@ -1157,7 +1157,7 @@ h6:not(.placeholder)::before { &:dir(rtl) { margin-left: 0; - margin-right: -26px; + margin-right: -52px; } &.collapsed { diff --git a/shared/styles/globals.ts b/shared/styles/globals.ts index 41bac1d531..121889e060 100644 --- a/shared/styles/globals.ts +++ b/shared/styles/globals.ts @@ -166,4 +166,12 @@ export default createGlobalStyle` .drop-cursor { border-radius: 9999px; } + + /* Block drag handle is appended to document.body, outside the styled + EditorContainer scope, so the print rule has to live globally. */ + @media print { + .block-drag-handle { + display: none !important; + } + } `;