Patchwork [2,of,4,V2] hgweb: CSS change to allow correct numbering for multiple code blocks

login
register
mail settings
Submitter Alexander Plavin
Date July 13, 2013, 10:12 p.m.
Message ID <eb5faeefa63e82c7b9a2.1373753531@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/1876/
State Superseded
Headers show

Comments

Alexander Plavin - July 13, 2013, 10:12 p.m.
# HG changeset patch
# User Alexander Plavin <me@aplavin.ru>
# Date 1373658651 -14400
#      Fri Jul 12 23:50:51 2013 +0400
# Node ID eb5faeefa63e82c7b9a25c24029e8649375a5112
# Parent  4ff0280567aab3b43c5058815d239d8fa4f1fb2e
hgweb: CSS change to allow correct numbering for multiple code blocks

This will be used to achieve correct line numbers in diff and
changeset (multiple diffs) views.

Patch

diff -r 4ff0280567aa -r eb5faeefa63e mercurial/templates/static/style-paper.css
--- a/mercurial/templates/static/style-paper.css	Fri Jul 12 23:47:56 2013 +0400
+++ b/mercurial/templates/static/style-paper.css	Fri Jul 12 23:50:51 2013 +0400
@@ -216,6 +216,7 @@ 
 .sourcelines {
   font-size: 90%;
   position: relative;
+  counter-reset: lineno;
 }
 
 .wrap > span {
@@ -226,6 +227,9 @@ 
     float: right;
 }
 
+.reset-lineno { counter-reset: lineno; }
+.inc-lineno { counter-increment: lineno; }
+
 .sourcelines > span {
   display: inline-block;
   width: 100%;
@@ -245,7 +249,7 @@ 
   font-size: smaller;
   color: #999;
   text-align: right;
-  content: counter(lineno);
+  content: counters(lineno, ".");
 }
 
 .sourcelines > span:target {