mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
fix(ui): remove opposite border to fix background banding on user messages
This commit is contained in:
@@ -177,25 +177,19 @@ func renderContentBlock(content string, containerWidth int, options ...rendering
|
||||
borderColor = *renderer.borderColor
|
||||
}
|
||||
|
||||
// Very muted color for the opposite border
|
||||
mutedOppositeBorder := AdaptiveColor("#F3F4F6", "#1F2937")
|
||||
|
||||
// Align determines which border gets the accent color.
|
||||
// Only render the accent-side border to avoid background
|
||||
// banding from the opposite border character.
|
||||
switch align {
|
||||
case lipgloss.Right:
|
||||
style = style.
|
||||
BorderRight(true).
|
||||
BorderLeft(true).
|
||||
BorderRightForeground(borderColor).
|
||||
BorderLeftForeground(mutedOppositeBorder)
|
||||
borderChars = 2
|
||||
BorderRightForeground(borderColor)
|
||||
borderChars = 1
|
||||
default: // Left (and fallback)
|
||||
style = style.
|
||||
BorderLeft(true).
|
||||
BorderRight(true).
|
||||
BorderLeftForeground(borderColor).
|
||||
BorderRightForeground(mutedOppositeBorder)
|
||||
borderChars = 2
|
||||
BorderLeftForeground(borderColor)
|
||||
borderChars = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user