Skip to content

fix: shift main content past fixed sidebar dock on desktop#1199

Merged
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
Ashvin-KS:fix/sidebar-margin-left-main
Jun 17, 2026
Merged

fix: shift main content past fixed sidebar dock on desktop#1199
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
Ashvin-KS:fix/sidebar-margin-left-main

Conversation

@Ashvin-KS

Copy link
Copy Markdown
Contributor

Description

Fixes the desktop sidebar overlap bug: when the fixed-position sidebar (.sidebar-dock, 280px wide / 80px when collapsed) is open or collapsed, the main .projects-section was being shifted over it instead of pushing past it. Cards in the leftmost column of the projects grid were clipped (e.g. "Dots & Boxes" rendered as "and Boxes", "FLAMES Game" as "MES Game", and the first "Try It" buttons were partially hidden).

Root cause: the Sidebar Layout - Clean version block at the end of web-app/css/styles.css defined padding-left: 0 !important for .projects-section (and its sidebar-state variants) at the document root. That rule loaded after the @media (min-width: 1100px) desktop-aware block (lines 1876-1917) which correctly sets padding-left: 296px (expanded) and 128px (collapsed), and the !important flag was canceling those desktop values for every viewport.

Fix:

  • Move the padding: 0 overrides inside @media (max-width: 1099px) so they only apply on mobile, where the sidebar is a drawer and the projects section should occupy the full width.
  • Add a smooth padding-left transition on the desktop sidebar-state changes (280ms cubic-bezier(0.16, 1, 0.3, 1)), matching the easing already used by the sidebar drawer itself.

The result: on desktop the projects grid (and hero / playground / footer) now slide smoothly past the sidebar as it expands, collapses, and closes. On mobile the drawer behavior is unchanged.

Linked Issue

Closes #1155
Closes #1136


Contribution Checklist

  • My code strictly adheres to the project guidelines (Standard library only, procedural code, clean spacing).
  • I have verified that my files are placed in the correct directory.
  • I have tested my changes thoroughly on my local machine.
  • I have included interactive emojis and clean console/UI outputs.
  • GSSoC 2026: I have been formally assigned to this issue and noted it above.

The 'clean' sidebar overrides at the end of styles.css were zeroing out
the desktop padding-left values (296px expanded, 128px collapsed) that
the @media (min-width: 1100px) block sets. As a result the fixed
position sidebar overlapped the projects grid on the left and clipped
the first column of cards (Dots & Boxes -> and Boxes, FLAMES -> MES, etc.).

- Move the mobile-only padding: 0 overrides inside @media (max-width: 1099px)
  so they no longer cancel the desktop-aware layout.
- Add a smooth padding-left transition for the desktop sidebar state
  changes (open / collapse / close).

Closes steam-bell-92#1155
Closes steam-bell-92#1136
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

@Ashvin-KS is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@steam-bell-92 steam-bell-92 merged commit a5c91c0 into steam-bell-92:main Jun 17, 2026
9 of 11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution!

Your Pull Request has been merged successfully.

We appreciate the time and effort you put into improving this project. Contributions like yours help the repository grow and stay useful for everyone.

If you'd like to contribute again, please check the open issues and make sure you are assigned before opening another Pull Request.

Thanks again for your support! 🙌

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Add margin-left to main content when sidebar is active to prevent overlap 🐛 [Bug]: Sidebar when minimized overlapes the games

2 participants