Skip to content

Codeblocks always show vertical scrollbar #1793

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

Closed
3 tasks done
MarkusKeck opened this issue Jan 13, 2023 · 4 comments
Closed
3 tasks done

Codeblocks always show vertical scrollbar #1793

MarkusKeck opened this issue Jan 13, 2023 · 4 comments
Labels
theme Related to the theme

Comments

@MarkusKeck
Copy link
Collaborator

Describe the bug

Codeblocks always show a vertical scrollbar even when no overflow happens.
There should never be a vertical scrollbar even when an overflow happens.
Only overflow-x should be possible.

Reproduction

Also appears on the official vitepress page

https://vitepress.vuejs.org/guide/markdown#code-groups

image

Expected behavior

No vertical scrollbar should appear ever

System Info

System:                                                        
    OS: Windows 10 10.0.19045                                    
    CPU: (32) x64 AMD Ryzen 9 3950X 16-Core Processor            
    Memory: 46.67 GB / 63.91 GB                                  
  Binaries:                                                      
    Node: 16.14.2 - C:\Program Files\nodejs\node.EXE             
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD               
    npm: 8.7.0 - C:\Program Files\nodejs\npm.CMD                 
  Browsers:                                                      
    Edge: Spartan (44.19041.1266.0), Chromium (108.0.1462.76)    
    Internet Explorer: 11.0.19041.1566                           
  npmPackages:                                                   
    vitepress: ^1.0.0-alpha.13 => 1.0.0-alpha.36

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@MarkusKeck MarkusKeck added the bug: pending triage Maybe a bug, waiting for confirmation label Jan 13, 2023
@kiaking
Copy link
Member

kiaking commented Jan 16, 2023

I can't reproduce this. Is anyone on Windows having the same issue? We can add overflow-y: hidden, but would like to know why this is heppening 👀

@kiaking kiaking added need more info Further information is requested theme Related to the theme and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jan 16, 2023
@MarkusKeck
Copy link
Collaborator Author

The scrollbar does not appear on Mozilla, but on Edge its also present.
Additional this only seems to happen on Windows, Linux and MacOS seem unaffected by this behaviour.

@MarkusKeck
Copy link
Collaborator Author

MarkusKeck commented Jan 16, 2023

Adding overflow-y: hidden resolves the problem.
Some people I told to check on their windows system could reproduce this issue, some couldnt.

@kiaking
Copy link
Member

kiaking commented Jan 17, 2023

@MarkusKeck Thanks for the check! I think adding overflow-y: hidden would make sense 👍 Would you like to create a PR? 😃

@kiaking kiaking added bug and removed need more info Further information is requested labels Jan 17, 2023
brc-dd added a commit that referenced this issue Jan 17, 2023
)

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
@brc-dd brc-dd closed this as completed Jan 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme Related to the theme
Projects
None yet
Development

No branches or pull requests

3 participants