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

Codeblocks cause layout breaks at some screen resolutions #3870

Closed
alexk111 opened this issue Dec 3, 2020 · 2 comments · Fixed by #4241
Closed

Codeblocks cause layout breaks at some screen resolutions #3870

alexk111 opened this issue Dec 3, 2020 · 2 comments · Fixed by #4241
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@alexk111
Copy link

alexk111 commented Dec 3, 2020

🐛 Bug Report

When a page contains a code block with long lines (scrollable horizontally) it breaks the layout at some screen resolutions.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Open a tab in Chrome
  2. Open DevTools in it
  3. Toggle Device Toolbar
  4. Set width = 1349 (got that value from a laptop with 1366x768 screen resolution)
  5. Open https://v2.docusaurus.io/docs/2.0.0-alpha.69/markdown-features/
  6. The layout issue happens (check the actual behavior below for details)
  7. Remove all the three horizontally scrollable codeblocks (using DevTools > Elements)
  8. The layout issue is gone and everything looks good

Expected behavior

The layout is ok.

Actual Behavior

The layout is not ok:

  1. Page width > screen width (scrollable on x axis)
  2. Sidebar collapse button moves up when scrolling the page down

image

Your Environment

  • Docusaurus version used: 2.0.0-alpha.69
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Chrome/Opera/FF
  • Operating system and version (desktop or mobile): Desktop
@alexk111 alexk111 added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Dec 3, 2020
@slorber
Copy link
Collaborator

slorber commented Dec 7, 2020

agree, there's something wrong in our layout here and the content should not be larger when there are code blocks

@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Dec 7, 2020
@rahgurung
Copy link

This issue only happens when a line is too long in code, in case of small width code, this if fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
3 participants