FSharp.Formatting icon indicating copy to clipboard operation
FSharp.Formatting copied to clipboard

Default code blocks render poorly on iOS/safari

Open adamchester opened this issue 10 years ago • 3 comments

image

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

adamchester avatar Dec 12 '14 23:12 adamchester

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

adamchester avatar Dec 13 '14 01:12 adamchester

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

tpetricek avatar Apr 20 '15 11:04 tpetricek

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...

matthid avatar Dec 18 '15 22:12 matthid