# HG changeset patch # User Anton Shestakov # Date 2015-06-25 12:27:36 # 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 --git a/mercurial/templates/coal/map b/mercurial/templates/coal/map --- a/mercurial/templates/coal/map +++ b/mercurial/templates/coal/map @@ -43,7 +43,7 @@ navgraph = '{before%navgraphentry}{after filenav = '{before%filenaventry}{after%filenaventry}' direntry = ' - + dir. {basename|escape}/ @@ -57,7 +57,7 @@ direntry = ' ' fileentry = ' - + file {basename|escape} @@ -73,11 +73,11 @@ filediff = ../paper/filediff.tmpl 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 @@ annotateline = ' {linenumber} {line|escape} ' -diffblock = '
{lines}
' +diffblock = '
{lines}
' difflineplus = '{linenumber} {line|escape}' difflineminus = '{linenumber} {line|escape}' difflineat = '{linenumber} {line|escape}' @@ -156,7 +156,7 @@ fileannotatechild = ' ' tags = ../paper/tags.tmpl tagentry = ' - + {tag|escape} @@ -168,7 +168,7 @@ tagentry = ' ' bookmarks = ../paper/bookmarks.tmpl bookmarkentry = ' - + {bookmark|escape} @@ -180,7 +180,7 @@ bookmarkentry = ' ' branches = ../paper/branches.tmpl branchentry = ' - + {branch|escape} @@ -219,7 +219,7 @@ filelogchild = ' ' indexentry = ' - + {name|escape} {description} {contact|obfuscate} diff --git a/mercurial/templates/static/style-coal.css b/mercurial/templates/static/style-coal.css --- a/mercurial/templates/static/style-coal.css +++ b/mercurial/templates/static/style-coal.css @@ -97,8 +97,12 @@ a { text-decoration:none; } .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 --git a/tests/test-hgweb-descend-empties.t b/tests/test-hgweb-descend-empties.t --- a/tests/test-hgweb-descend-empties.t +++ b/tests/test-hgweb-descend-empties.t @@ -217,7 +217,7 @@ manifest with descending (coal) drwxr-xr-x - + dir. a1/ @@ -229,7 +229,7 @@ manifest with descending (coal) drwxr-xr-x - + dir. b1/ @@ -241,7 +241,7 @@ manifest with descending (coal) drwxr-xr-x - + dir. d1/