# HG changeset patch # User Anton Shestakov # Date 2015-10-14 14:24:50 # Node ID 721274cef7746bcd4dcc7af1b3f0c03d9b5dd8dc # Parent e901df65b10898ca71540c495c60cec848043bd6 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. diff --git a/mercurial/templates/static/style-monoblue.css b/mercurial/templates/static/style-monoblue.css --- a/mercurial/templates/static/style-monoblue.css +++ b/mercurial/templates/static/style-monoblue.css @@ -262,13 +262,16 @@ span.difflineplus { color:#008800; } 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 @@ pre.sourcelines > a { 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; }