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

Non-hovered code block affects width of main content wrapper #1077

Closed
ang-zeyu opened this issue Mar 2, 2020 · 2 comments · Fixed by #1135
Closed

Non-hovered code block affects width of main content wrapper #1077

ang-zeyu opened this issue Mar 2, 2020 · 2 comments · Fixed by #1135

Comments

@ang-zeyu
Copy link
Contributor

ang-zeyu commented Mar 2, 2020

Tell us about your environment

  • MarkBind Version: Latest master

What did you do? Please include the actual source code causing the issue.

codeblockwidth

What did you expect to happen?
The width of the main container should not be affected by a code fence with a line longer than the content wrapper width, and the page nav should not go "out of the page" due to this

@nbriannl
Copy link
Contributor

nbriannl commented Mar 7, 2020

Preliminary examination:
Bug appears on some pages and not on others.
https://deploy-preview-1075--markbind-master.netlify.com/userguide/usingplugins
https://deploy-preview-1075--markbind-master.netlify.com/userguide/usingcomponents

@acjh
Copy link
Contributor

acjh commented Mar 7, 2020

The difference is that:

  • usingplugins has only 1 code block that overflows, while
  • usingcomponents has more than 1 code block that overflows.

The fix is to define a min-width for #content-wrapper so that flex: 1 can shrink correctly.
Let's add min-width: 0. We can remove width: 100%, which is ignored since we use flex.

#content-wrapper {
flex: 1;
margin: 0 auto;
max-width: 1000px;
padding: 0 20px;
transition: 0.4s;
width: 100%;
-webkit-transition: 0.4s;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants