stechico
10/23/2012 - 8:51 AM

CSS to add un-selectable line numbers to your github gists

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;
}