Skip to content

fix(projects): align project cards to the left on large screens#4524

Open
adams-okode wants to merge 2 commits into
Dokploy:canaryfrom
adams-okode:fix/align-project-cards-on-large-screens
Open

fix(projects): align project cards to the left on large screens#4524
adams-okode wants to merge 2 commits into
Dokploy:canaryfrom
adams-okode:fix/align-project-cards-on-large-screens

Conversation

@adams-okode

@adams-okode adams-okode commented May 31, 2026

Copy link
Copy Markdown

What is this PR about?

Fixed the project cards layout on the Projects page so they pack to the left with consistent gaps on large/wide screens instead of spreading across the full width.

Changes

  • Replaced the fixed grid-cols-* responsive classes with grid-cols-[repeat(auto-fill,minmax(280px,280px))] (starting at sm breakpoint).
  • Cards now naturally align left and only create as many columns as can physically fit.
  • Maintained full responsiveness across all screen sizes (full width on mobile, increasing density on larger screens).

Why this approach?

The previous implementation using explicit lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 caused the grid tracks to stretch across the entire container, resulting in large gaps between cards when there were fewer projects than available columns.

Testing

  • Tested locally on multiple screen sizes (mobile, laptop, 1440p, 4K, and ultrawide).
  • No logic changes — pure layout/CSS improvement.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

closes #4523

Screenshots (if applicable)

Before

Screenshot 2026-05-31 at 20 48 30

After

Screenshot 2026-05-31 at 21 15 40

- Switch from fractional grid-cols to repeat(auto-fill, minmax(280px, 280px))
- Cards now pack left with consistent gaps on all screen sizes
- Prevents large empty space between cards on wide screens
- Maintains responsive behavior (full width on mobile, increasing columns on bigger screens)
@adams-okode adams-okode marked this pull request as ready for review May 31, 2026 19:32
@adams-okode adams-okode requested a review from Siumauricio as a code owner May 31, 2026 19:32
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project cards spread far apart on large/wide screens instead of aligning left

2 participants