Last active
November 10, 2017 08:11
-
-
Save audunolsen/61b8767f6c451cde54bf0300663cb9d0 to your computer and use it in GitHub Desktop.
A .less snippet to zero pad the gutter numbers in Atom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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