GitHub-Dark icon indicating copy to clipboard operation
GitHub-Dark copied to clipboard

Tabsize width is reduced

Open Zarthus opened this issue 6 years ago • 7 comments

The tabsize/width of \t is decreased to a single space. This makes it very hard to identify indentation properly.

  • Browser: Chrome
  • Operating System: Win 10 (latest)
  • Screenshot: Dark: img None: img

GIF: gif

  • HTML of the section where the issue occurs:
<td class="code-review blob-code blob-code-addition">
        <button class="btn-link add-line-comment js-add-line-comment js-add-split-line-comment" data-type="addition" data-path="src/plugins/inputs/ctcp.js" data-anchor="diff-14eb41fc8833d241324d7684de7b7e8e" data-position="11" data-original-line="+		chan.pushMessage(this, new Msg({" data-line="9" data-side="right" type="button" aria-label="Add line comment">
           <svg class="octicon octicon-plus" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 9H7v5H5V9H0V7h5V2h2v5h5v2z"></path></svg>
         </button>

      <span class="blob-code-inner blob-code-marker" data-code-marker="+">		<span class="pl-smi">chan</span>.<span class="pl-en">pushMessage</span>(<span class="pl-c1">this</span>, <span class="pl-k">new</span> <span class="pl-en">Msg</span>({</span>

    </td>

Zarthus avatar Feb 08 '19 14:02 Zarthus

If you're using Stylus, you can go into the style optiond to set a preferred tab size. Default for the style is 2, default on GitHub is 8.

Your rendering for the first indented line does seem to have a bit small tab width thought, maybe that is a separate issue.

silverwind avatar Feb 08 '19 15:02 silverwind

This works, thanks!

Is there a reason the default is 2 spaces?

Zarthus avatar Feb 08 '19 15:02 Zarthus

It's mostly a personal preference of the authors :)

silverwind avatar Feb 08 '19 15:02 silverwind

We do have a separate tab-size addon (https://github.com/StylishThemes/GitHub-tab-size), so I think it's time we drop tab modification out of the style.

silverwind avatar Feb 08 '19 15:02 silverwind

Should we close this task? It's resolved to my desires, but you may still be interested in investigating the

Your rendering for the first indented line does seem to have a bit small tab width thought, maybe that is a separate issue.

bit (or discuss the latter point you raised in the above comment)

Zarthus avatar Feb 08 '19 15:02 Zarthus

Let's leave it open as a reminder to do something about tab sizes.

silverwind avatar Feb 09 '19 07:02 silverwind

Also tabsize related #543

the-j0k3r avatar Mar 03 '19 07:03 the-j0k3r