fix: custom tooltip (no wiggle required), add ⓘ indicator for described units

- Replace native title-based tooltip with custom positioned div
  Native title only renders on mousemove; custom div fires on mouseenter
  after 500ms delay as intended
- Tooltip styled dark with fade-in; Dan Mode gets yellow-on-black with magenta glow
- Units with descriptions show a small superscript ⓘ on the result label
This commit is contained in:
Falkan
2026-03-18 19:33:14 -04:00
parent 6e38522a89
commit 6a9ecf9d46
4 changed files with 96 additions and 14 deletions

View File

@@ -448,3 +448,30 @@
line-height: 1;
border-radius: var(--pico-border-radius);
}
/* ── Custom tooltip ────────────────────────────────────────────────────────── */
.hu-tooltip {
position: fixed;
z-index: 9999;
max-width: 280px;
padding: 0.4rem 0.6rem;
border-radius: 4px;
font-size: 0.8rem;
line-height: 1.4;
background: #1a1a2e;
color: #f0f0f0;
box-shadow: 0 2px 8px rgba(0,0,0,0.35);
pointer-events: none;
opacity: 0;
transition: opacity 0.15s ease;
white-space: normal;
}
.hu-tooltip--visible {
opacity: 1;
}
[data-theme=dan] .hu-tooltip {
background: #000;
color: #ffff00;
border: 1px solid #ff00ff;
box-shadow: 0 0 8px #ff00ff;
}