mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-10 23:47:12 +02:00
fix: make code blocks horizontally scrollable with full-width diff backgrounds
- Use white-space: pre for horizontal scrolling instead of wrapping - Add width: fit-content and min-width: 100% to code element - Ensure diff line backgrounds extend full width when scrolling
This commit is contained in:
@@ -69,20 +69,24 @@
|
||||
font-family: "Oxygen Mono", monospace;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word;
|
||||
white-space: pre;
|
||||
tab-size: 4;
|
||||
color: hsl(var(--foreground));
|
||||
/* Flex layout for consistent line spacing */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
/* Ensure lines extend for proper diff backgrounds */
|
||||
width: fit-content;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
/* Lines with proper spacing and wrapping */
|
||||
/* Lines with proper spacing */
|
||||
.shiki-container .line {
|
||||
display: block;
|
||||
min-height: 1.5em;
|
||||
/* Ensure background extends full width for diff highlighting */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Ensure shiki's inline styles don't conflict */
|
||||
|
||||
Reference in New Issue
Block a user