Skip to content

fix: make project cards responsive at 360px - #1451

Closed
riyanshigupta890-cloud wants to merge 2 commits into
komalharshita:mainfrom
riyanshigupta890-cloud:fix/responsive-cards-360px-v2
Closed

fix: make project cards responsive at 360px#1451
riyanshigupta890-cloud wants to merge 2 commits into
komalharshita:mainfrom
riyanshigupta890-cloud:fix/responsive-cards-360px-v2

Conversation

@riyanshigupta890-cloud

Copy link
Copy Markdown
Contributor

Summary [required]

This PR improves project card responsiveness on small mobile devices (360px–390px viewports). Budget Android phones often have 360px width, and the current design causes cards to overflow horizontally, wrapping tags awkwardly and clipping button text. This fix adds a three-tier responsive strategy: compact styling on mobile (360–380px), intermediate sizing on small tablets (381–640px), and original styling on larger devices (641px+). No JavaScript or logic changes; CSS only.

Related Issue [required]

Closes #9

Type of Change [required]

  • Bug fix — resolves a broken behaviour
  • Feature — adds new functionality
  • Data — adds new projects to data/projects.json
  • Documentation — updates docs, README, or code comments only
  • Style — CSS or visual changes only, no logic change
  • Refactor — restructures code without changing behaviour
  • Test — adds or updates tests

What Was Changed [required]

File Change made
static/style.css Added @media (max-width: 380px) block with reduced card padding (20px), single-column grid, smaller tags (0.7rem), and full-width buttons. Added @media (min-width: 381px) and (max-width: 640px) for intermediate tablet styles (24px padding). Added @media (min-width: 641px) to restore original desktop styles and prevent regressions.

How to Test This PR [required]

  1. Clone this branch: git checkout fix/responsive-cards-360px-v2
  2. Run the app: python app.py
  3. Open http://127.0.0.1:5000/#the-project in Chrome
  4. Open Chrome DevTools (F12) and enable Device Toolbar (Ctrl+Shift+M)
  5. Test the following viewports:
    • 360px (Pixel 4a): Fill the form and generate results. Verify no horizontal scroll, cards fit within viewport, tags wrap to 2 lines, buttons text fully visible.
    • 375px (iPhone SE): Verify stable intermediate state with same checks.
    • 390px (Pixel 6a): Verify no overflow or text clipping.
    • 768px (iPad): Verify original padding (24px+) restored, grid layout working, no regressions.
    • 1280px (Desktop): Verify full auto-fill grid, original spacing, all hover states work.

Test Results [required]

Visual regression testing completed across all breakpoints:

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

@riyanshigupta890-cloud is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc-2026 type:bug Something isn't working labels Aug 2, 2026
- Reduce card padding to 20px on mobile (360px-380px)
- Add intermediate styles for small tablets (381px-640px)
- Restore original padding on tablet+ (641px+)
- Tested at 360px, 375px, 390px, 768px, 1280px
- No regressions on larger breakpoints

Fixes komalharshita#9

Signed-off-by: Riyanshi Gupta <riyanshigupta890@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc-2026 type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the project cards section fully responsive at 360px

1 participant