Anton Shestakov <av6@dwimlabs.net>, Wed, 15 Apr 2020 15:20:29 +0800
kit: use CSS counters to render line numbers where possible
Affects changeset, file view, file diff and file annotate pages. Doesn't affect
file comparison page (aka side-by-side file diff).
Page size, regular file view (mercurial/commands.py):
- 987963 B before
- 596244 B after
Page size, changeset (4441705b7111):
- 1319976 B before
- 923672 B after
templates/static/style-kit.css
Permissions: -rw-r--r--
.uk-container.uk-width-1-1 { font: 13px/18px Consolas, monospace, serif; border-collapse: collapse; .kit-white-space-normal { background-color: #faa732; .kit-badge-phase-secret { background-color: #faa732; background-color: #a1a1a1; background-color: #da314b; background-color: #00a8e6; .kit-badge-branch-closed { .kit-badge-branch-inactive { border: 1px solid #00a8e6; background-color: #8cc14c; background-color: #c247ce; .kit-comparison tr:target, .kit-annotate tr:target { background-color: #ecfdf0; background-color: #f0f0f0; counter-increment: lineno; .kit-annotate-line a::before, a.kit-line-number::before { .kit-annotate-line a::before { content: counter(lineno); content: counter(diff) "." counter(lineno); a.kit-line-number::before { content: attr(data-line-number); background-color: #8cc14c; background-color: #da314b; .kit-comparison + .kit-comparison tr:first-child td { border-top: 1px solid #ddd; background-color: #ecfdf0; .kit-comparison-replace { background-color: #f8eec7; background-color: #fbe9eb;