# HG changeset patch # User Anton Shestakov # Date 1435235256 -28800 # Node ID ebdfca23c1ab777b205e9413055cfdbe76d393f6 # Parent edd2d20ac687c1b112ba5b53c93dcc6456f36d76 hgweb: use css for stripey background in coal Since "b8ecc3830c89 or 25dae11bb044::c229a5e7511e" paper style used css for stripes in background for browsing files, for listing branches/tags/bookmarks, and so on. Since coal borrows many paper templates (e.g. shortlogentry.tmpl), it actually tried to do the same, but it didn't have the needed css classes. You can compare https://selenic.com/hg?style=coal with https://selenic.com/hg?style=paper and see how log view in coal style has plain white background, unlike the one in paper style. This wasn't intended. Let's copy css classes directly from style-paper.css and remove parity classes from elements that don't need them anymore. This makes plain white background have stripes again and makes coal/map even more similar to paper/map (which can ease porting changes or %including paper/map in future). diff -r edd2d20ac687 -r ebdfca23c1ab mercurial/templates/coal/map --- a/mercurial/templates/coal/map Wed Jun 24 11:15:00 2015 -0400 +++ b/mercurial/templates/coal/map Thu Jun 25 20:27:36 2015 +0800 @@ -43,7 +43,7 @@ filenav = '{before%filenaventry}{after%filenaventry}' direntry = ' - + dir. {basename|escape}/ @@ -57,7 +57,7 @@ ' fileentry = ' - + file {basename|escape} @@ -73,11 +73,11 @@ filecomparison = ../paper/filecomparison.tmpl filelog = ../paper/filelog.tmpl fileline = ' -
{linenumber} {line|escape}
' +
{linenumber} {line|escape}
' filelogentry = ../paper/filelogentry.tmpl annotateline = ' - + {author|user}@{rev} @@ -85,7 +85,7 @@ {linenumber} {line|escape} ' -diffblock = '
{lines}
' +diffblock = '
{lines}
' difflineplus = '{linenumber} {line|escape}' difflineminus = '{linenumber} {line|escape}' difflineat = '{linenumber} {line|escape}' @@ -156,7 +156,7 @@ ' tags = ../paper/tags.tmpl tagentry = ' - + {tag|escape} @@ -168,7 +168,7 @@ ' bookmarks = ../paper/bookmarks.tmpl bookmarkentry = ' - + {bookmark|escape} @@ -180,7 +180,7 @@ ' branches = ../paper/branches.tmpl branchentry = ' - + {branch|escape} @@ -219,7 +219,7 @@ ' indexentry = ' - + {name|escape} {description} {contact|obfuscate} diff -r edd2d20ac687 -r ebdfca23c1ab mercurial/templates/static/style-coal.css --- a/mercurial/templates/static/style-coal.css Wed Jun 24 11:15:00 2015 -0400 +++ b/mercurial/templates/static/style-coal.css Thu Jun 25 20:27:36 2015 +0800 @@ -97,8 +97,12 @@ .age { white-space:nowrap; } .date { white-space:nowrap; } .indexlinks { white-space:nowrap; } -.parity0 { background-color: #f0f0f0; } -.parity1 { background-color: white; } +.parity0, +.stripes4 > :nth-child(4n+1), +.stripes2 > :nth-child(2n+1) { background-color: #f0f0f0; } +.parity1, +.stripes4 > :nth-child(4n+3), +.stripes2 > :nth-child(2n+2) { background-color: white; } .plusline { color: green; } .minusline { color: #dc143c; } /* crimson */ .atline { color: purple; } diff -r edd2d20ac687 -r ebdfca23c1ab tests/test-hgweb-descend-empties.t --- a/tests/test-hgweb-descend-empties.t Wed Jun 24 11:15:00 2015 -0400 +++ b/tests/test-hgweb-descend-empties.t Thu Jun 25 20:27:36 2015 +0800 @@ -217,7 +217,7 @@ drwxr-xr-x - + dir. a1/ @@ -229,7 +229,7 @@ drwxr-xr-x - + dir. b1/ @@ -241,7 +241,7 @@ drwxr-xr-x - + dir. d1/