дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-28 21:42:27 +02:00
A truncated element with a long data-tooltip put that text in the tooltip's shortcut slot (nowrap, keys font), which overflowed the bubble and crushed the main text to one character per line, as on the Remote Host Resources status item. The tooltip now shows such text as a wrapping note separate from the shortcut and honours data-no-tooltip up to the tooltip owner. The remote status items opt out of the redundant ellipsis tooltip and ellipsize their labels, and the breadcrumbs yield space first in the status bar. Co-authored-by: dengliu <[email protected]>
65 рядки
1.7 KiB
CSS
65 рядки
1.7 KiB
CSS
/* HelpTooltip / ToolTip.*: feedback-bg surface with feedback-border; shortcut in secondary text. */
|
|
.tooltip {
|
|
position: fixed;
|
|
z-index: var(--z-tooltip);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
max-width: min(720px, calc(100vw - 32px));
|
|
padding: 6px 10px;
|
|
border-radius: var(--radius-tooltip, 6px);
|
|
background: var(--bg-tooltip);
|
|
border: 1px solid var(--border-tooltip, var(--border-popup));
|
|
box-shadow: var(--shadow-tooltip);
|
|
color: var(--fg-tooltip);
|
|
font-size: var(--fs-ui);
|
|
line-height: 16px;
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
}
|
|
.tooltip[data-placed] {
|
|
opacity: 1;
|
|
transition: opacity var(--dur-fast) var(--ease);
|
|
}
|
|
/* Long paths wrap inside the bubble; the shortcut stays on one line. */
|
|
.withNote {
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
row-gap: var(--space-0-5);
|
|
}
|
|
.text {
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.note {
|
|
min-width: 0;
|
|
color: color-mix(in srgb, var(--fg-tooltip) 68%, transparent);
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.shortcut {
|
|
font-family: var(--font-keys);
|
|
font-size: var(--fs-ui);
|
|
color: color-mix(in srgb, var(--fg-tooltip) 62%, transparent);
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.stripe {
|
|
color: var(--fg-stripe-tooltip, var(--fg-tooltip));
|
|
padding: 8px 12px;
|
|
border-radius: 4px;
|
|
background: var(--bg-stripe-tooltip, var(--bg-tooltip));
|
|
border-color: var(--border-stripe-tooltip, var(--border-tooltip));
|
|
box-shadow: var(--shadow-stripe-tooltip, var(--shadow-tooltip));
|
|
line-height: 18px;
|
|
}
|
|
.stripe .note,
|
|
.stripe .shortcut {
|
|
color: color-mix(in srgb, var(--fg-stripe-tooltip, var(--fg-tooltip)) 80%, transparent);
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.tooltip[data-placed] {
|
|
transition: none;
|
|
}
|
|
}
|