comparison tests/test-hgweb.t @ 35531:6c2264732dc5

gitweb: make actual changeset entries have backgrounds on /graph This patch removes a separate container for backgrounds only and puts backgrounds on changeset elements themselves. This makes it so that JS code doesn't need to create background elements separately anymore. There's a bit of manipulating positions of elements: every changeset entry has a "fg" element that gets a higher z-index than <canvas> element. This prioritizes text information, so that even if it somehow gets close to the graph drawn on <canvas> (which has z-index of 5), it'll still be on top of it. This can happen if commit message has a long first line and browser window is narrow, for example.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 05 Jan 2018 19:16:08 +0800
parents ab9d8d298510
children 881596e51fca
comparison
equal deleted inserted replaced
35530:acd8a2454b47 35531:6c2264732dc5
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: 9135 343 content-length: 9118
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; background: white; color: black; } 346 body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; }
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; }
645 z-index: 5; 645 z-index: 5;
646 top: -0.9em; 646 top: -0.9em;
647 margin: 0; 647 margin: 0;
648 } 648 }
649 649
650 ul#nodebgs { 650 ul#graphnodes {
651 list-style: none inside none; 651 list-style: none inside none;
652 padding: 0; 652 padding: 0;
653 margin: 0; 653 margin: 0;
654 top: -0.7em; 654 }
655 } 655
656 656 ul#graphnodes li {
657 ul#graphnodes li, ul#nodebgs li { 657 position: relative;
658 height: 39px; 658 height: 37px;
659 } 659 overflow: visible;
660 660 padding-top: 2px;
661 ul#graphnodes { 661 }
662
663 ul#graphnodes li .fg {
662 position: absolute; 664 position: absolute;
663 z-index: 10; 665 z-index: 10;
664 top: -0.8em;
665 list-style: none inside none;
666 padding: 0;
667 } 666 }
668 667
669 ul#graphnodes li .info { 668 ul#graphnodes li .info {
670 font-size: 100%; 669 font-size: 100%;
671 font-style: italic; 670 font-style: italic;