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

Corrected overflow-x style to remove unnecessary horizontal scroll bar #770

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

terrence-ou
Copy link
Contributor

Hi,

When I was browsing the website, I found unnecessary horizontal scroll bars under each of the code blocks, which kind of affect visual consistency, as the following image shows:

x-bar

Then I went to the styles.scss file and found the attribute overflow-x was set to scroll. This means the horizontal scroll bar will always be there, whether the content is overflowing on the x-axis or not. I changed the value to auto to hide the bar when no overflow happens but show the scroll bar when horizontal scrolling is necessary.
The result after this modification is as shown in the following images:

When no x-scrolling needed:
no-x-bar

When content overflows:
Screenshot 2024-07-15 at 10 17 46 PM

Thanks so much for considering this update!

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be browser-dependent. I don't get the scroll bars without the change.

Either way, thank you.

@Darksonn Darksonn merged commit 44afd93 into tokio-rs:master Jul 16, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants