fix(tooltip): un-clip the caret — the real cause was overflow, not colour

The tooltip content is `position: relative; overflow: auto`, so the caret
(`position: absolute`, containing block = the content) that pokes past the panel
edge was CLIPPED away — invisible regardless of its colour. Confirmed by measuring:
the caret sits fully outside the content box, and the content clips its overflow.

Change the content to `overflow: visible` — the same reason the popover content is
`overflow: visible` (its comment literally says "fixes the arrow that overflow:auto
used to clip"). Tooltips are short, so no inner scroll viewport is needed.

Verified in a real browser: the dark caret is now clearly visible pointing at the
trigger. Combined with a40d1573 (caret colour back to currentColor) + the earlier
`display: block` (correct arrow height → correct trigger gap), the tooltip arrow is
visible and correctly placed again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
menubar-v4-safe
dev 3 months ago
parent a40d1573c5
commit c3def5d60f

@ -27,8 +27,11 @@
min-block-size: var(--_tooltip-content-min-height-override, auto);
max-block-size: var(--_tooltip-max-height);
padding: var(--_tooltip-py) var(--_tooltip-px);
overflow: auto;
overscroll-behavior: contain;
/* `visible` so the absolutely-positioned caret (containing block = this relative
* content) is NOT clipped where it pokes past the panel edge — the same reason
* the popover content is `overflow: visible`. Without this the arrow was clipped
* away entirely. Tooltips are short, so no inner scroll viewport is needed. */
overflow: visible;
border: var(--tooltip-border-width) solid var(--_tooltip-border);
border-radius: var(--tooltip-radius);
background: var(--_tooltip-bg);

Loading…
Cancel
Save

Powered by TurnKey Linux.