From 19e8ded8225bdc67f07b06fa6e71883cac38b759 Mon Sep 17 00:00:00 2001 From: unsc9 <438590997@qq.com> Date: Sun, 13 Sep 2026 09:26:09 +0800 Subject: [PATCH] fix(editor): keep the selection popup opaque under skins and hover The floating add-to-conversation button took its fills from the layer and hover tokens. Skin systems make those translucent (bg-layer-2 ~0.45) and the button is portalled to document.body, so the per-anchor skin fixes never reach it: the text underneath showed through. Hover was worse in every theme, skins or not -- interactive-bg-hover is a bare 0.06-0.08 overlay tint meant to sit on an existing surface, so on a standalone floating button it reads as fully transparent (measured on the default dark theme with no skin active). Use the host's menu fill plus the solid hover token instead. --- src/client/sidebar.module.css | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/client/sidebar.module.css b/src/client/sidebar.module.css index a72905ab..900ee26a 100644 --- a/src/client/sidebar.module.css +++ b/src/client/sidebar.module.css @@ -1784,8 +1784,11 @@ body[data-dsh-sidebar-dragging] .bottomPanel { /* The floating "add to conversation" button anchored above a text selection in the preview/code viewers. Portalled to document.body and position:fixed, so the editor's overflow clips cannot crop it; flat - chrome like the rest of the sidebar (hairline border, layer-2 fill, - hover fill — no shadow). */ + chrome like the rest of the sidebar (hairline border, no shadow). + Fills come from the menu/overlay pair, not the layer/hover pair: this + button floats over text with no panel behind it, while skins make the + layer tokens translucent (~0.45) and interactive-bg-hover a bare + 0.06-0.08 tint, neither of which is readable over the text beneath. */ .selectionPopup { position: fixed; z-index: 60; @@ -1796,7 +1799,7 @@ body[data-dsh-sidebar-dragging] .bottomPanel { padding: 0 10px; border: 1px solid var(--dsw-alias-border-l1); border-radius: 6px; - background: var(--dsw-alias-bg-layer-2); + background: var(--dsw-specific-menu); color: var(--dsw-alias-label-primary); font: var(--dsw-font-xxxs-strong-11); white-space: nowrap; @@ -1804,7 +1807,7 @@ body[data-dsh-sidebar-dragging] .bottomPanel { } .selectionPopup:hover { - background: var(--dsw-alias-interactive-bg-hover); + background: var(--dsw-alias-interactive-bg-hover-solid); } .editorPdf {