Skip to content

feat(web): make content width responsive on wide screens#496

Open
GeT-LeFt wants to merge 1 commit intotiann:mainfrom
GeT-LeFt:feat/responsive-content-width
Open

feat(web): make content width responsive on wide screens#496
GeT-LeFt wants to merge 1 commit intotiann:mainfrom
GeT-LeFt:feat/responsive-content-width

Conversation

@GeT-LeFt
Copy link
Copy Markdown

@GeT-LeFt GeT-LeFt commented Apr 19, 2026

Context

Follow-up to #493 which widened the content area from 720px → 960px. That was a great improvement, but on ultrawide or large monitors (≥1280px), there is still a lot of wasted horizontal space.

Solution

Introduce a CSS custom property --content-max-w that the Tailwind max-w-content token reads from:

  • < 1280px: keeps the existing 960px default — no visual change
  • ≥ 1280px: content scales to min(90%, 1200px), filling more of the viewport without stretching to the edges

Only 2 files changed, +8 −1 lines:

File Change
web/tailwind.config.ts Read max-width from CSS variable with 960px fallback
web/src/index.css Set --content-max-w at the 1280px breakpoint

Benefits

  • Better use of screen real estate on wide monitors
  • The CSS variable approach makes it easy to extend later (e.g. sidebar-aware resizing) without touching the Tailwind config
  • Zero impact on mobile/tablet layouts

Screenshots

Before (960px fixed):
Large empty margins on a 1920px-wide display.

After (responsive):
Content fills ~90% of available width, capped at 1200px.

(Happy to add screenshots if needed — my setup is macOS 1920×1080)

Fixes #499

Follow-up to tiann#493 which widened the content area from 720px to 960px.

On displays ≥1280px wide, replace the fixed max-width with a CSS
variable that scales to 90% of available width (capped at 1200px).
Screens below 1280px keep the 960px default, so the change is
invisible on smaller monitors.

The CSS custom property (`--content-max-w`) also opens the door for
future enhancements like sidebar-aware content resizing without
additional Tailwind config changes.
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • No actionable issues found in the added/modified lines.

Summary

  • Review mode: initial. No issues found in the latest diff. Residual risk: this is a CSS-only layout change without automated web coverage in repo, so responsive/manual validation at 1280px+, desktop sidebar layouts, and Telegram/browser shells remains the main gap.

Testing

  • Not run (automation)

HAPI Bot

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.

[Enhancement] Content area has fixed max-width on wide screens, wasting horizontal space

1 participant