Mercurial > hg
diff mercurial/templates/static/style-paper.css @ 19432:e92d4b8530cb
hgweb: file diff and changesets views behave like file source view
This gives all the benefits introduced before for file source view, namely
code selection without line numbers and correct indents, highlighting line
which is linked to, long lines wrapping.
Implementation strategy is also the same as for file source view: all the
lines are put in a sigle pre tag with span's for each line. Correct line
numbering (same as before this patch) is achieved with nested CSS counters.
author | Alexander Plavin <me@aplavin.ru> |
---|---|
date | Sat, 13 Jul 2013 00:57:10 +0400 |
parents | b8ecc3830c89 |
children | 5e518418738e |
line wrap: on
line diff
--- a/mercurial/templates/static/style-paper.css Fri Jul 12 23:47:56 2013 +0400 +++ b/mercurial/templates/static/style-paper.css Sat Jul 13 00:57:10 2013 +0400 @@ -216,6 +216,7 @@ .sourcelines { font-size: 90%; position: relative; + counter-reset: lineno; } .wrap > span { @@ -226,6 +227,9 @@ float: right; } +.diffblocks { counter-reset: lineno; } +.diffblocks > div { 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 {