diff --git a/static/git-arr.css b/static/git-arr.css index 3c3c648..03e7c06 100644 --- a/static/git-arr.css +++ b/static/git-arr.css @@ -268,21 +268,31 @@ table.blob-binary tr.etc { /* Pygments overrides. */ +div.colorized-src { + font-size: larger; +} + +div.colorized-src .source_code { + /* Ignore pygments style's background. */ + background: var(--body-bg); +} + +td.code > div.source_code { + /* This is a workaround, in pygments 2.11 there's a bug where the wrapper + * div is inside the table, so we need to override the descendant (because + * the style sets it on ".source_code" and the most specific value wins). + * Once we no longer support 2.11, we can remove this. */ + background: var(--body-bg); +} + div.linenodiv { padding-right: 0.5em; - font-size: larger; - /* must match div.source_code */ } div.linenodiv a { color: var(--text-lowcontrast-fg); } -div.source_code { - background: inherit; - font-size: larger; -} - /* Repository information table. */ table.repo_info tr:hover { diff --git a/views/blob.html b/views/blob.html index f1c6ad0..67ac11c 100644 --- a/views/blob.html +++ b/views/blob.html @@ -77,7 +77,9 @@ {{!markdown_blob(blob.utf8_content)}} % elif can_colorize(blob.utf8_content): +
{{!colorize_blob(fname.raw, blob.utf8_content)}} +
% else:
 {{blob.utf8_content}}
diff --git a/views/commit.html b/views/commit.html
index e21ff04..f753377 100644
--- a/views/commit.html
+++ b/views/commit.html
@@ -56,7 +56,9 @@
 
% if can_colorize(c.diff.body): +
{{!colorize_diff(c.diff.body)}} +
% else:
 {{c.diff.body}}