Skip to content
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

Remove unused scrollbar styles from themes #4422

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hichemfantar
Copy link
Contributor

@hichemfantar hichemfantar commented Jan 4, 2025

Eliminate unnecessary scrollbar styles from both shared and custom themes to streamline the codebase.

they seem to only work partially on codeblocks but even then it's always better to rely on native scrollbars as they behave more closely to user expectations. especially now that native scrollbars support the thin variant which docusaurus already applies at the right places.

image

Copy link

netlify bot commented Jan 4, 2025

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit bcc9c49
🔍 Latest deploy log https://app.netlify.com/sites/react-native/deploys/677e9d5b9bcc150008fa0774
😎 Deploy Preview https://deploy-preview-4422--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Simek
Copy link
Collaborator

Simek commented Jan 5, 2025

I think that those scrollbars are used and don't see anything wrong with them. In contrast, I think that they offer more control and flexibility for the developers, allowing to unify the overall appearance of website, no matter which platform or browser user uses..

Can you explain few points from you take?

streamline the codebase

What exactly you have in mind by that? Does the scrollbars hinder or negatively affect the code base?

they seem to only work partially on codeblocks

Have you tried to fix the spotted issue? Can you elaborate a bit more when they work and when not, and what is an expected behavior in your eyes?

it's always better to rely on native scrollbars as they behave more closely to user expectations

Can you explain a bit more that statement? I would say that the functionally the scrollbars are the same, no matter how they styled. What are the resources or stats you are basing your observations about users expectations on?

@hichemfantar
Copy link
Contributor Author

hichemfantar commented Jan 7, 2025

I checked the places where the custom scrollbar is being applied in the css (main scrollbar, main sidenav, blog sidebar, table of contents, codeblock) and they all use the native scrollbar. I believe these custom styles are from the v1 to v2 migration and are now broken and are being overwritten by docusaurus.

it's always better to rely on native scrollbars as they behave more closely to user expectations

Well this is from personal experience and other devs i worked with agreed with me but here's a collection of forums where the matter was heavily discussed.
https://www.reddit.com/r/webdev/comments/1bhhu7k/scrollbar_customization/
https://news.ycombinator.com/item?id=36302002
https://www.reddit.com/r/web_design/comments/akmnq5/why_do_developers_feel_the_need_to_reinvent_and/
https://www.reddit.com/r/webdev/comments/onz3a6/whats_up_with_styling_scrollbars/

@hichemfantar
Copy link
Contributor Author

Feel free to open both versions side by side and let me know if you find a difference because so far I couldn't find any.

@hichemfantar
Copy link
Contributor Author

@Simek I added a screenshot for visual proof in the original post

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.

3 participants