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:
27
src/app.css
27
src/app.css
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user