mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
Restyle markdown code blocks: dark background, smaller font, compact padding
- Switch code block background from transparent accent to dark (#1e1e2e) with light text (#cdd6f4) for better readability in both light and dark modes - Reduce code font size from 0.84em to 0.78em - Compact padding and margins on pre blocks - Hide MDXEditor code block toolbar by default, show on hover/focus to prevent overlap with code content on mobile - Use horizontal scroll instead of word-wrap for code blocks to preserve formatting Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
aea133ff9f
commit
fe0d7d029a
2 changed files with 37 additions and 11 deletions
|
|
@ -117,7 +117,7 @@ export function MarkdownBody({ children, className }: MarkdownBodyProps) {
|
|||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"paperclip-markdown prose prose-sm max-w-none break-words overflow-hidden prose-pre:whitespace-pre-wrap prose-pre:break-words prose-code:break-all",
|
||||
"paperclip-markdown prose prose-sm max-w-none break-words overflow-hidden prose-pre:my-1.5 prose-pre:px-2.5 prose-pre:py-2 prose-pre:overflow-x-auto prose-pre:whitespace-pre prose-code:break-all prose-code:text-[inherit]",
|
||||
theme === "dark" && "prose-invert",
|
||||
className,
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue