Skip to content

Latest commit

 

History

History
167 lines (131 loc) · 3.81 KB

File metadata and controls

167 lines (131 loc) · 3.81 KB

OllamaMax UI Spacing Improvements

Overview

Updated the chat interface to have cleaner, more spacious Grok-style formatting with better readability and visual hierarchy.

Key Changes

1. Message Spacing

Before:

  • Message rows: 24px margin-bottom
  • User messages: Same as bot messages

After:

  • Message rows: 40px margin-bottom (+67% increase)
  • User messages: 32px margin-bottom
  • Creates clear visual separation between conversations

2. Message Width

Before:

  • Messages: max-width 70% (crowded on wide screens)

After:

  • Messages: max-width 100% (uses full available space)
  • Better readability, especially for code blocks

3. Avatar Styling

Before:

  • Avatars: 32x32px
  • No top margin

After:

  • Avatars: 36x36px (+12.5% size increase)
  • 2px top margin for better vertical alignment
  • Gap between avatar and content: 16px (was 12px)

4. Message Content

Before:

  • Background: colored bubbles (tertiary background)
  • Padding: 12px 16px
  • Border-radius: 12px

After:

  • Background: transparent (cleaner, less visual clutter)
  • No padding (text flows naturally)
  • No border-radius
  • Line-height: 1.7 (increased from 1.5 for better readability)

5. Typography & Markdown

Paragraphs

Before:

  • Margin-bottom: 8px

After:

  • Margin-bottom: 16px (+100% increase)
  • Last paragraph: 0 margin-bottom
  • Better breathing room between paragraphs

Headings

Before:

  • Margin-top: 16px
  • Margin-bottom: 8px

After:

  • Margin-top: 24px (+50% increase)
  • Margin-bottom: 12px (+50% increase)
  • First heading: 0 top margin (no awkward gap at start)

Lists

Before:

  • Margin-bottom: 8px
  • List items: No specific spacing

After:

  • Margin-bottom: 16px (+100% increase)
  • List items: 8px margin-bottom between items
  • Clearer visual separation

6. Code Blocks

Pre blocks

Before:

  • Padding: 12px
  • Margin: 8px 0

After:

  • Padding: 16px (+33% increase)
  • Margin: 16px 0 (+100% increase)

Inline code

Before:

  • Padding: 2px 6px
  • Border-radius: 4px
  • Font-size: 13px

After:

  • Padding: 3px 8px (+33% increase)
  • Border-radius: 6px (more rounded)
  • Font-size: 14px (better readability)

Code block wrapper

Before:

  • Margin: 8px 0

After:

  • Margin: 20px 0 (+150% increase)
  • Creates clear separation from surrounding text

7. Copy Button & Language Label

Before:

  • Top position: 8px
  • Padding: 4px 8px
  • Font-size: 11px

After:

  • Top position: 12px (more breathing room)
  • Padding: 6px 12px (larger, easier to click)
  • Font-size: 12px (more readable)
  • Language label: letter-spacing 0.5px (cleaner appearance)

Visual Comparison

Spacing Hierarchy (in px)

Message Row Spacing:        24 → 40  (+67%)
Paragraph Spacing:           8 → 16  (+100%)
Code Block Margins:          8 → 20  (+150%)
Heading Top Margin:         16 → 24  (+50%)
List Spacing:                8 → 16  (+100%)
Avatar Gap:                 12 → 16  (+33%)
Pre Block Padding:          12 → 16  (+33%)

Design Philosophy

Before (Crowded)

  • Tight spacing everywhere
  • Colored message bubbles
  • Content feels cramped
  • Hard to distinguish between different messages

After (Grok-style)

  • Generous whitespace
  • Clean, minimal backgrounds (transparent)
  • Content breathes naturally
  • Clear visual hierarchy
  • Easy to scan and read
  • Professional, modern appearance

Browser Cache

Updated CSS version to v=3 to force browser reload of new styles.

Testing

To see the improvements:

  1. Clear browser cache (Ctrl+Shift+R / Cmd+Shift+R)
  2. Or open in incognito/private window
  3. Send a message with:
    • Multiple paragraphs
    • Code blocks
    • Lists
    • Headings

Compare the spacing with the original tight layout.

Mobile Responsiveness

All spacing improvements scale proportionally on mobile devices, maintaining the same visual hierarchy at smaller screen sizes.