Mercurial > hg
diff mercurial/templates/static/style-monoblue.css @ 26314:119202d4d7a4
monoblue: port code selection without line numbers from gitweb
This is adapted from 2239626369f5.
It also fixes issue4790 in monoblue; tab characters now have meaningful width on
the modified pages (file view, file diff, changeset).
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 23 Sep 2015 16:02:35 +0800 |
parents | 8aa6fb6de161 |
children | 3bfc473f4d33 |
line wrap: on
line diff
--- a/mercurial/templates/static/style-monoblue.css Tue Sep 22 15:10:24 2015 -0500 +++ b/mercurial/templates/static/style-monoblue.css Wed Sep 23 16:02:35 2015 +0800 @@ -255,33 +255,57 @@ font-family: monospace; white-space: pre; font-size: 1.2em; - padding: 3px 0; } +div.diffblocks { counter-reset: lineno; } +div.diffblock { counter-increment: lineno; } span.difflineplus { color:#008800; } span.difflineminus { color:#cc0000; } span.difflineat { color:#990099; } +pre.sourcelines { position: relative; counter-reset: lineno; } +pre.sourcelines > span { + display: inline-block; + box-sizing: border-box; + width: 100%; + padding: 0 0 0 5em; + font-size: 1.2em; + counter-increment: lineno; +} +div.source > pre.sourcelines > span { + padding: 1px 1px 1px 5em; +} +pre.sourcelines > span:before { + -moz-user-select: -moz-none; + -khtml-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + display: inline-block; + margin-left: -5em; + width: 4em; + color: #999; + text-align: right; + content: counters(lineno,"."); + float: left; +} +pre.sourcelines > a { + display: inline-block; + position: absolute; + left: 0px; + width: 4em; + height: 1em; +} +pre.sourcelines.stripes > :nth-child(4n+1) { background-color: #F1F6F7; } +pre.sourcelines.stripes > :nth-child(4n+3) { background-color: #FFFFFF; } +pre.sourcelines.stripes > :nth-child(4n+1):hover, +pre.sourcelines.stripes > :nth-child(4n+3):hover { background-color: #D5E1E6; } + td.source { white-space: pre; margin: 10px 30px 0; font-size: 1.2em; font-family: monospace; } - div.source div.parity0, - div.source div.parity1 { - padding: 1px; - font-size: 1.2em; - } - div.source div.parity0 { - background: #F1F6F7; - } - div.source div.parity1 { - background: #FFFFFF; - } -div.parity0:hover, -div.parity1:hover { - background: #D5E1E6; -} .linenr { color: #999; text-align: right;