mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
fix(desktop): tighten composer↔timeline parity for pre code and anchor
Address Marge's review on PR #913: - pre code: add `block min-w-full whitespace-pre font-mono text-foreground` so pasted/markdown-rendered code blocks mirror CODE_BLOCK_CLASS in markdown.tsx token-for-token. Previously the composer's pre code only reset the inline-code styling; it inherited block layout by default, which is fine in practice but isn't true parity. - anchor: add `transition-colors hover:text-primary/80` so hover treatment matches the rendered timeline. Heading sizes, pre shadow (shadow-xs), and pre max-h ([400px]) were flagged in review but already match markdown.tsx exactly (h1=text-xl leading-8, h2=text-lg leading-7, h3=text-base leading-6 at line 791-806; pre uses shadow-xs and max-h-[400px] at line 436). No change needed there. Verified: pnpm typecheck, pnpm lint, pnpm build all green.
This commit is contained in:
parent
aabfe1d55d
commit
589acfcb14
@@ -316,7 +316,7 @@
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.rich-text-composer .tiptap a {
|
||||
@apply font-medium text-primary underline underline-offset-4 cursor-pointer;
|
||||
@apply font-medium text-primary underline underline-offset-4 transition-colors hover:text-primary/80 cursor-pointer;
|
||||
}
|
||||
|
||||
/* Inline code. */
|
||||
@@ -329,7 +329,9 @@
|
||||
@apply max-h-[400px] overflow-x-auto overflow-y-auto rounded-xl border border-border/70 bg-muted/60 px-3 py-1.5 shadow-xs;
|
||||
}
|
||||
.rich-text-composer .tiptap pre code {
|
||||
@apply bg-transparent p-0 rounded-none text-[13px] leading-6;
|
||||
/* Mirrors CODE_BLOCK_CLASS in markdown.tsx so a pasted/markdown-rendered
|
||||
* code block looks identical in the composer and in the timeline. */
|
||||
@apply block min-w-full whitespace-pre rounded-none bg-transparent p-0 font-mono text-[13px] leading-6 text-foreground;
|
||||
}
|
||||
|
||||
/* Blockquote. */
|
||||
|
||||
Reference in New Issue
Block a user