Skip to content

Instantly share code, notes, and snippets.

@shrwnsan
Forked from tnylea/GitHub Gists CSS
Created October 23, 2012 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shrwnsan/3937715 to your computer and use it in GitHub Desktop.
Save shrwnsan/3937715 to your computer and use it in GitHub Desktop.
CSS to add un-selectable line numbers to your github gists
.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: -4ex;
position: absolute;
text-align: right;
width: 3.0ex;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@shrwnsan
Copy link
Author

Adjusted style-rules for ".gist .highlight pre div:before": left, and width... to display double-digit numbers correctly with Foundation 2.x + Reverie WP Theme over at http://j.mp/sv5ZMx (Just a Memo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment