4 ms·
8 is the standard tab width. That's probably why GitHub chose it. (Why 8? I've no idea. Somebody will be along with an explanation soon enough, I am sure, and y
by tom_ 8y ago
8 is the standard tab width. That's probably why GitHub chose it. (Why 8? I've no idea. Somebody will be along with an explanation soon enough, I am sure, and you can decide whether you believe it or not. But, whatever, it has been 8 for a very long time.)
- mcguire 8y agoIf you're using a typewriter and constructing tables (hence "tab"), 8 is a good balance between column width and number of columns.
- saagarjha 8y agoI don’t think it’s GitHub that chose this; the standard size for a tab in most browsers seems to be eight characters.
- tom_ 8y agoThat's a good point. I checked and it does actually just seem to pass the tab characters through, letting the browser do its thing.
- chrismorgan 8y agoTo change it from 8, you need the `tab-size` CSS property. This has long been supported by all except IE/Edge. This can be very neat for responsive design: use tabs for your indentation, and then on large screens use `tab-size: 4` because you’ve got space to spare and four is generally superior to two, and on narrow screens use `tab-size: 2` because you don’t have as much width to play with.