Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
19431:b8ecc3830c89 | 19432:e92d4b8530cb |
---|---|
214 .bottomline { border-bottom: 1px solid #999; } | 214 .bottomline { border-bottom: 1px solid #999; } |
215 | 215 |
216 .sourcelines { | 216 .sourcelines { |
217 font-size: 90%; | 217 font-size: 90%; |
218 position: relative; | 218 position: relative; |
219 counter-reset: lineno; | |
219 } | 220 } |
220 | 221 |
221 .wrap > span { | 222 .wrap > span { |
222 white-space: pre-wrap; | 223 white-space: pre-wrap; |
223 } | 224 } |
224 | 225 |
225 .linewraptoggle { | 226 .linewraptoggle { |
226 float: right; | 227 float: right; |
227 } | 228 } |
229 | |
230 .diffblocks { counter-reset: lineno; } | |
231 .diffblocks > div { counter-increment: lineno; } | |
228 | 232 |
229 .sourcelines > span { | 233 .sourcelines > span { |
230 display: inline-block; | 234 display: inline-block; |
231 width: 100%; | 235 width: 100%; |
232 padding: 1px 0px; | 236 padding: 1px 0px; |
243 width: 4em; | 247 width: 4em; |
244 margin-right: 1em; | 248 margin-right: 1em; |
245 font-size: smaller; | 249 font-size: smaller; |
246 color: #999; | 250 color: #999; |
247 text-align: right; | 251 text-align: right; |
248 content: counter(lineno); | 252 content: counters(lineno, "."); |
249 } | 253 } |
250 | 254 |
251 .sourcelines > span:target { | 255 .sourcelines > span:target { |
252 background-color: #ffff99; | 256 background-color: #ffff99; |
253 } | 257 } |