style(webui): improve typography with Apple-inspired font stack and CJK support

- Add explicit CJK fonts (PingFang SC, Noto Sans SC, Microsoft YaHei) and
  programmer fonts (JetBrains Mono, Fira Code, Cascadia Code) to Tailwind config
- Bump prose base size from prose-sm (14px) to prose-lg (18px) for sharper CJK rendering
- Unify user/assistant message font size at 18px with CJK-aware line-height (1.8)
- Replace pure black/white foreground with Apple-style warm grays (#1d1d1f / #f5f5f7)
- Override Tailwind Typography colors to use design tokens for consistency
- Add negative letter-spacing on headings for tighter, more polished look
This commit is contained in:
chengyongru
2026-04-20 00:21:07 +08:00
committed by Xubin Ren
parent 56a779c128
commit a3adec08a9
5 changed files with 72 additions and 21 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ export function MessageBubble({ message }: MessageBubbleProps) {
<p
className={cn(
"ml-auto w-fit rounded-[18px] border border-border/60 bg-secondary/70 px-4 py-2",
"text-right text-sm whitespace-pre-wrap break-words",
"text-right text-[18px]/[1.8] whitespace-pre-wrap break-words",
"shadow-[0_10px_24px_-18px_rgba(0,0,0,0.55)]",
)}
>
@@ -49,7 +49,7 @@ export function MessageBubble({ message }: MessageBubbleProps) {
const empty = message.content.trim().length === 0;
return (
<div className={cn("w-full text-sm leading-relaxed", baseAnim)}>
<div className={cn("w-full text-sm", baseAnim)} style={{ lineHeight: "var(--cjk-line-height)" }}>
{empty && message.isStreaming ? (
<TypingDots />
) : (