Patchwork [2,of,4] monoblue: also highlight target line on annotate and comparison pages

login
register
mail settings
Submitter Anton Shestakov
Date Nov. 25, 2017, 8:50 a.m.
Message ID <b538ecc131988ca3c2c0.1511599839@neuro>
Download mbox | patch
Permalink /patch/25747/
State Accepted
Headers show

Comments

Anton Shestakov - Nov. 25, 2017, 8:50 a.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1511594587 -28800
#      Sat Nov 25 15:23:07 2017 +0800
# Node ID b538ecc131988ca3c2c07fc8bcb9c87768c5731c
# Parent  b49cc79b7aab3a0ecae1eb8ce9cef87b17b296de
# EXP-Topic hgweb-cleanup
monoblue: also highlight target line on annotate and comparison pages

Clicking on a line link on pages that show any kind of file contents (including
diffs) should highlight that line, and in monoblue it works when there's a
<pre> element (e.g. diff), but pages that use <table> element (annotate and
compare) need this css class. It matches and highlights linked (":target")
table rows. This line is pretty much copied from gitweb theme.

Patch

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
@@ -321,6 +321,7 @@  pre.sourcelines.stripes > :nth-child(4n+
 pre.sourcelines.stripes > :nth-child(4n+1):hover + :nth-child(4n+2),
 pre.sourcelines.stripes > :nth-child(4n+3):hover + :nth-child(4n+4) { background-color: #D5E1E6; }
 
+tr:target td,
 pre.sourcelines > span:target,
 pre.sourcelines.stripes > span:target {
     background-color: #bfdfff;