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 double scrolling bars #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eregon
Copy link
Contributor

@eregon eregon commented Nov 28, 2021

Screenshot from 2021-11-28 13-42-12

There may a better solution, but at least this is one way to fix it.

@chrisseaton
Copy link
Collaborator

What browser are you seeing this on?

@eregon
Copy link
Contributor Author

eregon commented Nov 29, 2021

Firefox, but also on Chrome (looks slightly different but still double scroll bars).

@chrisseaton
Copy link
Collaborator

I don't get why it shows scroll bars when it's not overflowing though?

@eregon
Copy link
Contributor Author

eregon commented Nov 30, 2021

The correct value is overflow-x: auto: https://www.w3schools.com/cssref/css3_pr_overflow-x.asp
scroll just means always show the scrollbar.
I'm not sure where you got that CSS from, but IIRC I got the same issue with the Jekyll default theme years ago.

This is an extract from my blog's CSS, and that part seems auto-generated with the minima theme:

.highlight {
  background-color: #f9f9f9;
  border-radius: 3px;
  line-height: 1.4;
  margin: 0 0 1rem;
  padding: 1rem; }
  .highlight pre {
    margin-bottom: 0;
    overflow-x: auto; }
  .highlight .lineno {
    color: #aaa;
    display: inline-block;
    padding: 0 .75rem 0 .25rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none; }

So, it should be overflow-x: auto;, and probably only on the .highlight pre, not .highlight (but it seems to work fine if on both)

@eregon
Copy link
Contributor Author

eregon commented Nov 30, 2021

I updated the PR, this should fix it.
Please squash it since I used the GitHub online editor.

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.

None yet

2 participants