-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] scroll bar in the default style is blocking the code block in Windows 10 #1260
Comments
I removed the old style because on macOS, you get a nice overlay scrollbar that does not shift the layout and hides automatically by default. Also I don't have a Windows device right now, can you test whether https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter would help? |
Unfortunately, This is what This is without (current state): This is I also noticed that there are quite a lot of tailwind CSS, maybe should we try https://www.npmjs.com/package/tailwind-scrollbar |
Another interesting thing about the offset caused by the scrollbar is that the scrollbar causes the head bar position to change. This can be seen when switching pages. Because 100% is not equal to 100vw when there is a scrollbar. |
There is some effort called "fluent scrollbar" to bring an overlay scrollbar to Chrome and Edge on Windows. https://issues.chromium.org/issues/40213017 but there isn't much progress and activity recently. |
That's one of the reasons why I switched to the native scrollbar, because on macOS, you get an overlay scrollbar https://developer.chrome.com/docs/css-ui/scrollbar-styling#:~:text=Overlay%20scrollbars%20are%20floating%20scrollbars,the%20operating%20system%20to%20decide. that does not eat into the layout and thus avoid problems like this. But apparently it's not easy to get an overlay scrollbar on Windows. |
Apparently, for Windows machines, there are some experimental flags in Chrome based browser where you can enable the macOS-liked scrollbar behaviour This video shows the fluent scrollbar: https://www.youtube.com/watch?v=GdCNvcTu5ZA And this one shows an overlay scrollbar (with fluent scrollbar): https://www.youtube.com/watch?v=3EFHqmHcxhM |
Describe the bug 描述你遇到的错误
Since 6d8755d, the scroll bar in default style in Windows 10 is actually blocking the lower part of the code block.
Before the code block reworking from #1225, this was rendered as:
Expected behavior 期待的行为
Maybe the CSS needs to be adjusted to reserve some space for the scroll bar, and the amount of space should automatically be correctly determined by the rendering engine (so that no matter how thick is the scroll bar in the default style, the engine should always get it right.)
Screenshots 屏幕截图
See above
Build Environment 构建环境
Preview Environment 预览环境
Additional Information 补充信息
I guess it is just a small bug from 6d8755d
The text was updated successfully, but these errors were encountered: