Browse Source

No margin/border without line numbers

pull/93/head v1.2.2
andreimarcu 9 years ago
parent
commit
9467be9717
  1. 6
      static/css/highlight/lines.css
  2. 3
      static/js/bin_hljs.js

6
static/css/highlight/lines.css

@ -1,14 +1,14 @@
#normal-code {
.linenumbers {
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
margin-left: 36px; margin-left: 36px;
position: relative; position: relative;
} }
#normal-code code {
.linenumbers code {
counter-reset: linenumbers; counter-reset: linenumbers;
} }
#normal-code code div:before {
.linenumbers code div:before {
content: counter(linenumbers); content: counter(linenumbers);
counter-increment: linenumbers; counter-increment: linenumbers;
left: -36px; left: -36px;

3
static/js/bin_hljs.js

@ -12,4 +12,7 @@ for (var i = 0; i < lines.length; i++) {
codeb.appendChild(div); codeb.appendChild(div);
}; };
var ncode = document.getElementById("normal-code");
ncode.className = "linenumbers";
// @license-end // @license-end
Loading…
Cancel
Save