Skip to content

Commit 7a30999

Browse files
andresdjassoclaude
andcommitted
style(emcn): put tooltip text on the design scale (text-caption)
Replace the tooltip's ad-hoc `text-xs` + `leading-[18px]` with the semantic `text-caption` (12px) font-size token so the text styling is fully on the design scale and self-documenting, matching how the rest of the system is set up. The color already used the global `--text-body` token. No visual change (still 12px with a ~18px line height). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9c96fff commit 7a30999

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

apps/sim/components/emcn/components/tooltip/floating-tooltip.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export const FloatingTooltip = memo(function FloatingTooltip({
239239
role={role}
240240
aria-hidden={role ? undefined : 'true'}
241241
className={cn(
242-
'pointer-events-none fixed top-0 left-0 z-[var(--z-tooltip)] w-fit max-w-[min(16rem,calc(100vw-2rem))] rounded-lg border border-[var(--border)] bg-[var(--bg)] px-2 py-1.5 text-[var(--text-body)] text-xs opacity-100 shadow-sm transition-[opacity,filter,transform] duration-150 ease-out',
242+
'pointer-events-none fixed top-0 left-0 z-[var(--z-tooltip)] w-fit max-w-[min(16rem,calc(100vw-2rem))] rounded-lg border border-[var(--border)] bg-[var(--bg)] px-2 py-1.5 text-[var(--text-body)] text-caption opacity-100 shadow-sm transition-[opacity,filter,transform] duration-150 ease-out',
243243
'motion-reduce:transition-none',
244244
className
245245
)}
@@ -248,11 +248,7 @@ export const FloatingTooltip = memo(function FloatingTooltip({
248248
transformOrigin: state.alignX === 'left' ? '12px 12px' : 'calc(100% - 12px) 12px',
249249
}}
250250
>
251-
{children ?? (
252-
<span className='block whitespace-normal break-words text-left leading-[18px]'>
253-
{label}
254-
</span>
255-
)}
251+
{children ?? <span className='block whitespace-normal break-words text-left'>{label}</span>}
256252
</div>,
257253
document.body
258254
)

0 commit comments

Comments
 (0)