monoblue: make the size of line links bigger to cover line numbers better
authorAnton Shestakov <av6@dwimlabs.net>
Wed, 14 Oct 2015 22:24:50 +0800
changeset 26667 721274cef774
parent 26666 e901df65b108
child 26668 ceb446439f1d
monoblue: make the size of line links bigger to cover line numbers better Due to how the line numbers in monoblue are formed (via css counters), the size of the area with the numbers and the size of the actually clickable links are not tied together well enough. Before this patch, there were noticeable "gaps" between line links - clicking on the bottom part of a visible line number did nothing as opposed to selecting this line. Let's set font-size for everything in pre.sourcelines so that it also affects the links and then add a bit of padding to them so compensate for layout differences. This way the sizes are still not 100% the same, but should be very close.
mercurial/templates/static/style-monoblue.css
--- a/mercurial/templates/static/style-monoblue.css	Sat Sep 26 18:16:49 2015 +0800
+++ b/mercurial/templates/static/style-monoblue.css	Wed Oct 14 22:24:50 2015 +0800
@@ -262,13 +262,16 @@
 span.difflineminus { color:#cc0000; }
 span.difflineat { color:#990099; }
 
-pre.sourcelines { position: relative; counter-reset: lineno; }
+pre.sourcelines {
+    position: relative;
+    counter-reset: lineno;
+    font-size: 1.2em;
+}
 pre.sourcelines > span {
     display: inline-block;
     box-sizing: border-box;
     width: 100%;
     padding: 0 0 0 5em;
-    font-size: 1.2em;
     counter-increment: lineno;
     vertical-align: top;
 }
@@ -295,6 +298,7 @@
     left: 0px;
     width: 4em;
     height: 1em;
+    padding: 0.15em;
 }
 pre.sourcelines.stripes > :nth-child(4n+1) { background-color: #F1F6F7; }
 pre.sourcelines.stripes > :nth-child(4n+3) { background-color: #FFFFFF; }