Skip to content

Commit 1f9620d

Browse files
committed
fix(web): restore markdown file-link CSS lost during merge
Today's merge from main silently dropped several CSS additions that landed on main while our branch was in flight: - `.chat-markdown-file-link` / `:hover` / `:focus-visible` / `-icon` / `-label` (from #1956 — the file-link UX redesign) - `.markdown-file-link-tooltip-scroll` + its `::-webkit-scrollbar*` variants (same PR) - `--chat-markdown-codeblock-copy-button-space` var, the padding-right adjustment that uses it, and the `cursor: pointer` on the copy button (from #1985) - `@custom-variant wco` (from #1969) `ChatMarkdown.tsx` still references all four file-link class names, so their absence silently un-styled every inline file link the assistant renders. Fix by rebasing our index.css additions on top of origin/main so the only delta versus main is the additive Chat-font-size tier block (`text-chat-*` utilities + `[data-timeline-root]` scaling).
1 parent 8b7cede commit 1f9620d

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

apps/web/src/index.css

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
@import "tailwindcss";
22

33
@custom-variant dark (&:is(.dark, .dark *));
4+
/* Window Controls Overlay: active when Electron exposes native titlebar control geometry. */
5+
@custom-variant wco (&:is(.wco, .wco *));
46

57
@theme inline {
68
--animate-skeleton: skeleton 2s -1s infinite linear;
@@ -360,6 +362,47 @@ label:has(> select#reasoning-effort) select {
360362
font-size: 0.75rem;
361363
}
362364

365+
.chat-markdown-file-link {
366+
display: inline-flex;
367+
align-items: center;
368+
gap: 0.28rem;
369+
border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
370+
border-radius: 0.375rem;
371+
background: color-mix(in srgb, var(--muted) 88%, var(--background));
372+
padding: 0.08rem 0.34rem;
373+
color: var(--foreground);
374+
font-family: var(--font-mono, ui-monospace, monospace);
375+
font-size: 0.75rem;
376+
line-height: 1.15;
377+
vertical-align: text-bottom;
378+
transition:
379+
background-color 120ms ease,
380+
border-color 120ms ease,
381+
color 120ms ease,
382+
opacity 120ms ease;
383+
}
384+
385+
.chat-markdown-file-link:hover {
386+
opacity: 1;
387+
color: var(--foreground);
388+
border-color: color-mix(in srgb, var(--border) 65%, var(--foreground));
389+
background: color-mix(in srgb, var(--muted) 72%, var(--background));
390+
}
391+
392+
.chat-markdown-file-link:focus-visible {
393+
outline: none;
394+
box-shadow: 0 0 0 1px color-mix(in srgb, var(--ring) 70%, transparent);
395+
}
396+
397+
.chat-markdown-file-link-icon {
398+
opacity: 0.72;
399+
}
400+
401+
.chat-markdown-file-link-label {
402+
color: color-mix(in srgb, var(--foreground) 88%, transparent);
403+
line-height: 1.1;
404+
}
405+
363406
.chat-markdown pre {
364407
max-width: 100%;
365408
overflow-x: auto;
@@ -376,13 +419,33 @@ label:has(> select#reasoning-effort) select {
376419
font-size: 0.75rem;
377420
}
378421

422+
.markdown-file-link-tooltip-scroll {
423+
scrollbar-width: thin;
424+
scrollbar-color: color-mix(in srgb, var(--border) 78%, transparent) transparent;
425+
}
426+
427+
.markdown-file-link-tooltip-scroll::-webkit-scrollbar {
428+
height: 6px;
429+
}
430+
431+
.markdown-file-link-tooltip-scroll::-webkit-scrollbar-track {
432+
background: transparent;
433+
}
434+
435+
.markdown-file-link-tooltip-scroll::-webkit-scrollbar-thumb {
436+
border-radius: 999px;
437+
background: color-mix(in srgb, var(--border) 78%, transparent);
438+
}
439+
379440
.chat-markdown .chat-markdown-codeblock {
441+
--chat-markdown-codeblock-copy-button-space: 1.5rem;
380442
position: relative;
381443
margin: 0.65rem 0;
382444
}
383445

384446
.chat-markdown .chat-markdown-codeblock pre {
385447
margin: 0;
448+
padding-right: calc(0.9rem + var(--chat-markdown-codeblock-copy-button-space));
386449
}
387450

388451
.chat-markdown .chat-markdown-copy-button {
@@ -399,6 +462,7 @@ label:has(> select#reasoning-effort) select {
399462
border: 1px solid var(--border);
400463
background: color-mix(in srgb, var(--background) 82%, transparent);
401464
color: var(--muted-foreground);
465+
cursor: pointer;
402466
opacity: 0;
403467
pointer-events: none;
404468
transition:

0 commit comments

Comments
 (0)