comparison tests/test-hgweb.t @ 26362:3bfc473f4d33

gitweb, monoblue: fix vertical align of spans in .sourcelines Empty lines in file view could produce an inexplicable margin before the next line (most noticeable in browsers on webkit/blink engine). That was making empty lines seem taller than the rest. Instead of using default vertical align, let's set it to 'top'. This issue is actually present in paper, and only recently got into gitweb (2239626369f5) and monoblue (119202d4d7a4). There's a bit more to it in paper, so that will be dealt with in a future patch. Recipe to see live: preferably using a webkit/blink browser, such as chromium, browse a file with empty lines, e.g. https://selenic.com/hg/file/3.5/README#l8 Selecting a block of text that includes empty lines will reveal white "breaks" in the selection. Highlighted line (#l8) also shows such a break below itself.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 25 Sep 2015 03:02:38 +0800
parents 2239626369f5
children f29ee23bf361
comparison
equal deleted inserted replaced
26361:6b4a0c602bec 26362:3bfc473f4d33
338 338
339 static file 339 static file
340 340
341 $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server 341 $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server
342 200 Script output follows 342 200 Script output follows
343 content-length: 6242 343 content-length: 6264
344 content-type: text/css 344 content-type: text/css
345 345
346 body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; } 346 body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; }
347 a { color:#0000cc; } 347 a { color:#0000cc; }
348 a:hover, a:visited, a:active { color:#880000; } 348 a:hover, a:visited, a:active { color:#880000; }
439 display: inline-block; 439 display: inline-block;
440 box-sizing: border-box; 440 box-sizing: border-box;
441 width: 100%; 441 width: 100%;
442 padding: 0 0 0 5em; 442 padding: 0 0 0 5em;
443 counter-increment: lineno; 443 counter-increment: lineno;
444 vertical-align: top;
444 } 445 }
445 pre.sourcelines > span:before { 446 pre.sourcelines > span:before {
446 -moz-user-select: -moz-none; 447 -moz-user-select: -moz-none;
447 -khtml-user-select: none; 448 -khtml-user-select: none;
448 -webkit-user-select: none; 449 -webkit-user-select: none;