Skip to content

Instantly share code, notes, and snippets.

@audunolsen
Last active November 10, 2017 08:11
Show Gist options
  • Save audunolsen/61b8767f6c451cde54bf0300663cb9d0 to your computer and use it in GitHub Desktop.
Save audunolsen/61b8767f6c451cde54bf0300663cb9d0 to your computer and use it in GitHub Desktop.
A .less snippet to zero pad the gutter numbers in Atom
/* Zero pad the gutter numbers in Atom for a cleaner look. */
// loop through 1 - 9
@iterations: 8;
.double-zero-pad (@i) when (@i >= 0) {
.line-number[data-buffer-row="@{i}"]::before,
.git-line-removed[data-buffer-row="@{i}"]::before { content: '00' !important }
.double-zero-pad(@i - 1);
} .double-zero-pad (@iterations);
// loop through 10 - 99
@iterations: 98;
.single-zero-pad (@i) when (@i >= 9) {
.line-number[data-buffer-row="@{i}"]::before,
.git-line-removed[data-buffer-row="@{i}"]::before { content: '0' !important }
.single-zero-pad(@i - 1);
} .single-zero-pad (@iterations);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment