Created
September 26, 2011 18:53
-
-
Save potch/1243028 to your computer and use it in GitHub Desktop.
CSS to add line numbers to embedded gists
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
.gist-highlight { | |
border-left: 3ex solid #eee; | |
position: relative; | |
} | |
.gist-highlight pre { | |
counter-reset: linenumbers; | |
} | |
.gist-highlight pre div:before { | |
color: #aaa; | |
content: counter(linenumbers); | |
counter-increment: linenumbers; | |
left: -3ex; | |
position: absolute; | |
text-align: right; | |
width: 2.5ex; | |
} |
Nice job!
Great Hack... Thankz
@chriseldredge A special thankz for you too.....
wow!
Really nics, thx :)
now is correct:
.gist .gist-highlight {
border-left: 3ex solid #eee;
position: relative;
}
.gist .gist-highlight pre {
counter-reset: linenumbers;
}
.gist .gist-highlight pre div:before {
color: #aaa;
content: counter(linenumbers);
counter-increment: linenumbers;
left: -3ex;
position: absolute;
text-align: right;
width: 2.5ex;
}
Doesn't seem to work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍