From 23abb5efa2f7f67eb8ff46ac04f876f26fe72ac5 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Fri, 21 Jun 2019 17:21:55 -0500 Subject: [PATCH 1/2] Global: Fix CodeMirror tab sizes. See #543 --- github-dark.css | 3 +++ tools/usercss.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/github-dark.css b/github-dark.css index ec786ca99..fbf00fa95 100644 --- a/github-dark.css +++ b/github-dark.css @@ -10576,6 +10576,9 @@ .blob-code, .blob-code-inner { color: var(--ghd-code-color, #ccc) !important; } + .cm-tab { + overflow: hidden !important; + } } @-moz-document regexp("^https://www\.zuora\.com.*github\.com.*$") { /* Styles the payment form iframe */ diff --git a/tools/usercss.js b/tools/usercss.js index e95b88c38..36e5ebb20 100644 --- a/tools/usercss.js +++ b/tools/usercss.js @@ -72,6 +72,9 @@ function makeTabs(css) { pre, .highlight, .diff-table, .tab-size { tab-size: ${tab} !important; -moz-tab-size: ${tab} !important; + } + .cm-tab { + width: ${tab}ch !important; } EOT;`); }); return css.replace(" {{tab-sizes}}", tabs.join("\n")); From e2b303b0bdf1556a92fcdcf20a2046caa6dd95ef Mon Sep 17 00:00:00 2001 From: the-j0k3r <31389848+the-j0k3r@users.noreply.github.com> Date: Sat, 15 Feb 2020 15:02:53 +0000 Subject: [PATCH 2/2] generate usercss --- github-dark.user.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/github-dark.user.css b/github-dark.user.css index b0e58025c..340249b09 100644 --- a/github-dark.user.css +++ b/github-dark.user.css @@ -160,36 +160,57 @@ pre, .highlight, .diff-table, .tab-size { tab-size: 2 !important; -moz-tab-size: 2 !important; + } + .cm-tab { + width: 2ch !important; } EOT; 3 "3" <<