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

Strange posts layout on mobile devices when code blocks are present #82

Closed
BDHU opened this issue Sep 4, 2020 · 1 comment
Closed

Comments

@BDHU
Copy link

BDHU commented Sep 4, 2020

Here are two examples. Here is a link to one of my posts: post_1.
As you reduce the width of the browser window the contents of the post is correctly pushed into new lines.

Here is another example: post_2.
If we reduce the window width we can see that some contents are not pushed to the next line. Instead part of the content is displayed off of the screen (or browser window).

It seems the problem is caused by the code snippet block: ```C some code ```. By removing those blocks, the layout returns to normal state. (More specifically, if the code in the block exceeds certain length then they will be displayed entirely in one line instead of showing scrolling options.) It seems the display size is set to the max code block width instead of screen width. Mathjax also causes the page width to be set to that of the longest formula in the post. Is there any to fix the issue on mobile devices? Thanks.

@BDHU BDHU changed the title posts layout doesn't change on mobile devices when code blocks are present Strange posts layout on mobile devices when code blocks are present Sep 4, 2020
@BDHU
Copy link
Author

BDHU commented Sep 4, 2020

Apparently I modified the jekyll-theme-minimal.scss which caused this issue. I figured out which line caused the headache. Close this issue now.

@BDHU BDHU closed this as completed Sep 4, 2020
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

No branches or pull requests

1 participant