2026-07-23 17:08:47 +08:00
|
|
|
/* Visual spec mirrors deepsuite @deepseek/ui Tooltip.css (size m, no arrow),
|
2026-08-04 14:14:12 +08:00
|
|
|
except padding tightened 6/12 -> 3/7, type 14/22 -> 13/20, and radius
|
|
|
|
|
10 -> 8 by product ruling: tooltip-bg plate,
|
2026-07-23 17:08:47 +08:00
|
|
|
one text color across both themes (the plate stays dark in light and dark
|
|
|
|
|
mode). Behavior (fixed positioning off the anchor rect) is local — the
|
|
|
|
|
upstream Floating stack is intentionally not vendored. */
|
|
|
|
|
|
|
|
|
|
.bubble {
|
|
|
|
|
position: fixed;
|
|
|
|
|
z-index: 100;
|
2026-08-04 14:14:12 +08:00
|
|
|
/* Fixed-position shrink-to-fit measures only the space from `left` to the
|
|
|
|
|
viewport edge, so anchors near the right edge would wrap early;
|
|
|
|
|
max-content sizes by the label alone, capped at half the viewport. */
|
|
|
|
|
width: max-content;
|
|
|
|
|
max-width: 50vw;
|
|
|
|
|
padding: 3px 7px;
|
2026-07-23 17:08:47 +08:00
|
|
|
border-radius: 8px;
|
|
|
|
|
background: var(--dsw-alias-tooltip-bg);
|
|
|
|
|
color: var(--dsw-static-neutral-bluish-00);
|
2026-08-04 14:14:12 +08:00
|
|
|
font-size: 13px;
|
|
|
|
|
line-height: 20px;
|
2026-08-03 13:47:37 +08:00
|
|
|
white-space: pre-line;
|
2026-08-04 14:14:12 +08:00
|
|
|
/* Unbreakable tokens (URLs, paths) must not push past max-width. */
|
|
|
|
|
overflow-wrap: break-word;
|
2026-07-23 17:08:47 +08:00
|
|
|
pointer-events: none;
|
|
|
|
|
animation: tooltip-in 150ms var(--ds-ease-in-out);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bubble[data-side='right'] {
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bubble[data-side='bottom'] {
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-04 14:14:12 +08:00
|
|
|
.bubble[data-side='top'] {
|
|
|
|
|
transform: translate(-50%, -100%);
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-23 17:08:47 +08:00
|
|
|
@keyframes tooltip-in {
|
|
|
|
|
from { opacity: 0; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
|
.bubble {
|
|
|
|
|
animation: none;
|
|
|
|
|
}
|
|
|
|
|
}
|