[PR #1751] Fix: Add 'stable' css styling to scrollbar-gutter to fix layout shifts when opening modals #10048

Open
opened 2026-02-16 18:14:36 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1751
Author: @ShpetimA
Created: 8/9/2025
Status: 🔄 Open

Base: devHead: fix-scrollbar-gutter


📝 Commits (3)

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 packages/web/src/styles/custom.css (+4 -0)

📄 Description

https://github.com/sst/opencode/issues/5848

To fix this I added scrollbar-gutter: "stable" styling to avoid layout shifting when opening modals like cmd+k or other things that cause the scrollbar to disappear.
https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter

Without srollbar-gutter layout shifts:

https://github.com/user-attachments/assets/e07242c6-7002-4a2d-b73d-f671bfabc4be

With scrollbar-gutter: "stable" no layout shift:

https://github.com/user-attachments/assets/afbf62ce-906d-4bcb-8f80-4ad85fa32f9d


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1751 **Author:** [@ShpetimA](https://github.com/ShpetimA) **Created:** 8/9/2025 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix-scrollbar-gutter` --- ### 📝 Commits (3) - [`f412b6f`](https://github.com/anomalyco/opencode/commit/f412b6f3c159f723c746ccd07f6a726b28f97412) Add stable css styling to scrollbar-gutter - [`2709e2c`](https://github.com/anomalyco/opencode/commit/2709e2cec6696a90b48848e4bcd56ec3df0e876e) Merge branch 'dev' of https://github.com/ShpetimA/opencode into fix-scrollbar-gutter - [`d797efc`](https://github.com/anomalyco/opencode/commit/d797efcd7b789b05bb517638bc71362e3e1cc773) Merge branch 'dev' of https://github.com/ShpetimA/opencode into fix-scrollbar-gutter ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/web/src/styles/custom.css` (+4 -0) </details> ### 📄 Description https://github.com/sst/opencode/issues/5848 To fix this I added scrollbar-gutter: "stable" styling to avoid layout shifting when opening modals like cmd+k or other things that cause the scrollbar to disappear. https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter Without srollbar-gutter layout shifts: https://github.com/user-attachments/assets/e07242c6-7002-4a2d-b73d-f671bfabc4be With scrollbar-gutter: "stable" no layout shift: https://github.com/user-attachments/assets/afbf62ce-906d-4bcb-8f80-4ad85fa32f9d --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10048