ThorSummoner
ThorSummoner

Reputation: 18109

What is GitHub's character limit, or line length for viewing files on GitHub?

I simple wanted to know how many characters can be viewed without overflow (horizontal scrolling) on any GitHub source view page.

Upvotes: 41

Views: 17818

Answers (4)

spacer GIF
spacer GIF

Reputation: 705

With the new GitHub design, 160 characters are visible for me on Ubuntu - Chrome or Firefox.

1280×1024 users will initially see 158 characters if they have a vertical scrollbar, though by scrolling a little horizontally they can still view 160 characters with up to 4 digits of line numbers.

So basically 160 characters is now fairly safe for desktop users. Mobile users are pretty much a lost cause - 37 characters for devices 360 CSS pixels wide.

Thanks to @aizatto for the link to https://github.com/aizatto/character-length.

Upvotes: 11

cubuspl42
cubuspl42

Reputation: 8360

On OS X v10.9 (Mavericks):

  • Google Chrome: 125
  • Firefox: 122
  • Safari: 121

Upvotes: 21

aizatto
aizatto

Reputation: 421

I was just testing this again https://github.com/aizatto/character-length

Testing on macOS Sierra 10.12.6 (16G29):

For both:

  • Safari Version 11.0 (12604.1.38.1.7)
  • Chrome Version 60.0.3112.113 (Official Build) (64-bit):

When:

  • Viewing a file (Fixed Length): 117 chars
  • Viewing a diff (Scales):
    • 920px width - Half of MBPr 15"; Usable but requires scrolling: 58 chars
    • 1280px width - 3/4s of MBPr 5"; 1/2 of 2880px; Decent: 78 chars
    • 1706px width - 3/4s of 2560px: 115 chars
    • 1920px width - MBPr 15": 120 chars
    • 2560px width: 164 chars

Upvotes: 10

ThorSummoner
ThorSummoner

Reputation: 18109

I attempted to simulate the font-family fall back with the web inspector

On Ubuntu:

  • Firefox: 126
  • Opera 12.16: 126

Screenshot of Github with Character counts

  • Chromium: 113

enter image description here

Upvotes: 19

Related Questions