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

Header following a code block - scrollbar overlapse #1332

Closed
AntonyGarand opened this issue Dec 16, 2018 · 1 comment · Fixed by #1540
Closed

Header following a code block - scrollbar overlapse #1332

AntonyGarand opened this issue Dec 16, 2018 · 1 comment · Fixed by #1540
Assignees
Labels
bug always open for contribution external contributors welcome contribution is welcome!
Milestone

Comments

@AntonyGarand
Copy link
Contributor

Describe the bug
Making a header next to a code block with a horizontal scrollbar makes an area overlapping with the scrollbar and the header.

Tested under Firefox only.

image
image

This makes us select the text instead of / while moving the scrollbar, which is annoying.

To Reproduce
Steps to reproduce the behavior:

Create a blog post with the following content:

-``` Ignore the prefixed -, this is for the github markdown. --- Continuing the line to get a scrollbar, you can ignore this content.
-```
# This is a header. It should overlap with the scrollbar.

Preview or post it, and try moving the horizontal scrollbar by selecting an area above the header text.

Expected behavior
The scrollbar moves without selecting the text.

Screenshots

image
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Firefox
  • Version: 64.0

Additional context

This can be fixed with the following CSS:

div.highlight + h1 {
    margin-top: 50px;
}

Where h1 can be h1-h6.

@Zhao-Andy Zhao-Andy added bug always open for contribution external contributors welcome contribution is welcome! labels Dec 17, 2018
@Zhao-Andy
Copy link
Contributor

Thanks @AntonyGarand, your solution makes sense. Whoever takes this should test in various browser if the anchor link for the header jumps properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug always open for contribution external contributors welcome contribution is welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants