diff --git a/src/uix/eidos/components/tooltip/tooltip.css b/src/uix/eidos/components/tooltip/tooltip.css index 40b3ae9d5..34004cb0d 100644 --- a/src/uix/eidos/components/tooltip/tooltip.css +++ b/src/uix/eidos/components/tooltip/tooltip.css @@ -75,40 +75,22 @@ /* ── Arrow ──────────────────────────────────────────────────────────────── */ -/* Colour the SVG shapes directly. The polygon/path carry `fill="currentColor"` / - * `stroke="currentColor"` presentation attributes, which a `fill`/`stroke` set on - * the wrapping does NOT override — an element's own presentation attribute - * beats an inherited value, so the caret rendered with `color` (dark text) instead - * of the panel bg. Target the polygon (body) + path (the two exposed edges) like - * the popover recipe. `display: block` keeps the SVG off the text baseline (which - * added phantom height + misaligned the caret). */ +/* `display: block` keeps the SVG off the text baseline. Inline added ~21px of + * phantom height, which both misaligned the caret AND — since the positioner adds + * the measured arrow height to the gap (`offset = sideOffset + arrowHeight`) — + * pushed the panel too far from the trigger. This is the fix that mattered. + * + * The caret colour is left as `currentColor` (the panel's dark text colour), the + * long-standing behaviour: it reads against the page. Matching the caret to the + * panel bg is technically "correct" (a seamless extension) but makes it INVISIBLE + * on a light-on-light tooltip — the panel is defined by its box-shadow, which the + * separate caret element doesn't share. A properly matched-and-visible caret needs + * its own drop-shadow; deferred until that can be verified. */ [data-tooltip-arrow] svg { display: block; overflow: visible; } -[data-tooltip-arrow] polygon { - fill: var(--_tooltip-bg, var(--tooltip-bg)); - stroke: none; -} - -[data-tooltip-arrow] path { - stroke: var(--_tooltip-border, var(--tooltip-border)); - stroke-width: var(--tooltip-border-width); - vector-effect: non-scaling-stroke; -} - -/* Outline variant: transparent bg → fill the arrow with the surface (masks the - * panel-border seam) and stroke the two exposed edges. */ -[data-tooltip-content][data-variant='outline'] ~ [data-tooltip-arrow] polygon, -[data-tooltip-content][data-variant='outline'] [data-tooltip-arrow] polygon { - fill: var(--color-surface-default); -} -[data-tooltip-content][data-variant='outline'] ~ [data-tooltip-arrow] path, -[data-tooltip-content][data-variant='outline'] [data-tooltip-arrow] path { - stroke: var(--color-border-strong); -} - /* ── Entrance / exit ───────────────────────────────────────────────────────── * Tooltip morfo's data-state values: 'closed' | 'delayed-open' | 'instant-open'. * 'delayed-open' (hover) scales in subtly; 'instant-open' (keyboard focus)