Skip to content

fix(ui): show horizontal scrollbar on code blocks in markdown#454

Open
haliliceylan wants to merge 5 commits intoKilo-Org:devfrom
haliliceylan:fix-406
Open

fix(ui): show horizontal scrollbar on code blocks in markdown#454
haliliceylan wants to merge 5 commits intoKilo-Org:devfrom
haliliceylan:fix-406

Conversation

@haliliceylan
Copy link

@haliliceylan haliliceylan commented Feb 19, 2026

Context

fixes #406

closes #406

Code blocks displayed in chat sessions had no visible horizontal scrollbars, making it impossible to scroll horizontally to view long lines of code except by highlighting and dragging.

Implementation

Modified packages/ui/src/components/markdown.css to show horizontal scrollbars on pre elements:

  • Changed scrollbar-width: none to scrollbar-width: thin for Firefox
  • Added scrollbar-color for Firefox styling using design system variables
  • Updated webkit scrollbar styling to show horizontal scrollbar (height: 8px) while hiding vertical scrollbar (width: 0)
  • Styled scrollbar thumb with design system colors (--border-weak-base, --border-strong-base on hover)

Screenshots

before after
please see #406 Screenshot 2026-02-19 at 00 58 08

How to Test

Trigger a response that includes a code block with long lines

Get in Touch

https://discord.com/channels/1349288496988160052/1391109167275577464/1473821631267995872

@vercel
Copy link

vercel bot commented Feb 19, 2026

@haliliceylan is attempting to deploy a commit to the Kilo Code Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@catrielmuller catrielmuller self-requested a review February 19, 2026 13:54
@kiloconnect
Copy link
Contributor

kiloconnect bot commented Feb 19, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

This PR improves scrollbar styling across the UI:

  • Hides scrollbar arrow buttons globally and in the VS Code theme by changing display: blockdisplay: none with width: 0
  • Adds custom thin scrollbar styling for pre elements in the markdown component with both standard (scrollbar-width, scrollbar-color) and WebKit-specific pseudo-elements for cross-browser support
  • Updates flake.lock (nixpkgs version bump)
Files Reviewed (3 files)
  • flake.lock - lock file update (skipped)
  • packages/kilo-ui/src/components/markdown.css - no issues
  • packages/kilo-ui/src/styles/globals.css - no issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No horizontal scroll bars in code views in chat session (VSCode)

2 participants

Comments