git.github.io icon indicating copy to clipboard operation
git.github.io copied to clipboard

Code blocks not rendered properly in smaller screens

Open sivaraam opened this issue 6 years ago • 3 comments

I noticed an issue in which the code block in the "git log --oneline improvements" section renders badly in smaller screen. Further it also breaks the single-pagedness of the website. As a consequence, one might have to zoom in to read the post and scrolling might take you to empty space in the right. Screen shots:

  • Desktop view: Screenshot from 2019-03-10 20-56-49

  • Mobile view (iPhone SE resolution) Screenshot from 2019-03-10 20-56-14

    Screenshot from 2019-03-10 21-03-46

    Note the scroll bar in the bottom of the page.

It would be nice to fix this by making the code blocks render in such a way that the code within the block is scrollable rather than the whole page being scrollable.

Note: Initially mentioned in https://github.com/git/git.github.io/pull/366#issuecomment-471316738

sivaraam avatar Mar 10 '19 17:03 sivaraam

@sivaraam thanks for creating the issue!

chriscool avatar Mar 10 '19 18:03 chriscool

Hi Kaartic,

thank you for bringing up the issue - I fully support your view. Unfortunately, I fail to understand how we could change the GitHub [standard] markdown --> HTML formatting in a way that it creates scrollable boxes for code blocks. Any ideas/hints?

Best regards, Markus a { cursor: text; }

mjaix avatar Mar 19 '19 22:03 mjaix

Actually, I created this issue just because I didn't have any ideas about how to go about it :-).

Anyways, I was thinking this could be solved by tweaking the theme of the blog somehow.

sivaraam avatar Mar 21 '19 03:03 sivaraam