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

Default code blocks render poorly on iOS/safari #230

Open
adamchester opened this issue Dec 12, 2014 · 3 comments
Open

Default code blocks render poorly on iOS/safari #230

adamchester opened this issue Dec 12, 2014 · 3 comments

Comments

@adamchester
Copy link

image

The 'pre' block inside the table seems to overflow incorrectly, as the screenshot shows.

@adamchester
Copy link
Author

Same issue on OS X Yosemite:
screen shot 2014-12-13 at 11 04 10 am

@tpetricek
Copy link
Member

If any CSS experts can come up with a better way of handling overflowing code, that would be great...

@matthid
Copy link
Member

matthid commented Dec 18, 2015

I just had a similar issue on my website and used the following "fix":

table.pre {
    table-layout: fixed;
    width: calc(100% - 50px); /* here I used 2* the margin from my parent container, that's why this solution is not really universal */
}

table.pre pre {
  /* Show scrollbar when size is too small */
  overflow: auto;
}

table.pre td.lines {
  /* Align on top such that line numbers are at the correct place when the scrollbar is shown */
  vertical-align: top;
}

I'm not really a css expert so I would feel more comfortable if someone can review/test this.
Note that I used this on my website so I'm not sure how this would work out here as FSF is used on various places...

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

No branches or pull requests

3 participants