From 76e02050a9caf61f476404faee831d65a6ff9797 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 30 Jan 2026 11:05:49 +0000 Subject: [PATCH] fix: improve code block line spacing and wrap long lines - Increase line-height from 1.4 to 1.5 for better readability - Use pre-wrap instead of pre to allow long line wrapping - Add overflow-wrap: break-word to break long URLs/strings --- src/styles/shiki-theme.css | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/styles/shiki-theme.css b/src/styles/shiki-theme.css index 820b904..04f4d43 100644 --- a/src/styles/shiki-theme.css +++ b/src/styles/shiki-theme.css @@ -68,22 +68,21 @@ .shiki-container code { font-family: "Oxygen Mono", monospace; font-size: 0.75rem; - line-height: 1.4; - white-space: pre; - word-spacing: normal; - word-break: normal; + line-height: 1.5; + white-space: pre-wrap; + overflow-wrap: break-word; tab-size: 4; color: hsl(var(--foreground)); - /* Flex layout for tight line packing */ + /* Flex layout for consistent line spacing */ display: flex; flex-direction: column; gap: 0; } -/* Lines should be inline-block to allow background colors */ +/* Lines with proper spacing and wrapping */ .shiki-container .line { display: block; - min-height: 1.4em; + min-height: 1.5em; } /* Ensure shiki's inline styles don't conflict */