From 09128ad3adddb9cc1274a219757590416473ceba Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Thu, 1 Dec 2022 22:53:19 +0100 Subject: [PATCH] Revert "Change markup for diff insert/delete lines" This reverts commit b75d2f0e03317c9b37dfdb702f3a959555309890. This commit has some issues: - It uses / not for the content that was actually added/removed (i.e. the diff), but for the line stats. I don't think that helps accessibility, it might actually make it worse. - It adds some CSS to apply text decoration to /, but only inside the `diff` class. However, the elements never occur inside the `diff` class (see first item). The CSS is never used. - Instead, the place where it was used (line stats) got unintended text decoration applied, causing a follow-up commit which fixed this the wrong way, causing yet more issues (fixed in next commit). I think the one place where it would make sense to apply / is the diff itself, but that might be a more serious operation. --- gitsrht/templates/utils.html | 4 ++-- scss/main.scss | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gitsrht/templates/utils.html b/gitsrht/templates/utils.html index 9a9637d..14d6c75 100644 --- a/gitsrht/templates/utils.html +++ b/gitsrht/templates/utils.html @@ -195,8 +195,8 @@ instead. target="_blank" {% endif %} >{{patch.delta.new_file.raw_path.decode('utf-8', 'replace')}}{# - #} +{{patch.line_stats[1]}}{# - #} -{{patch.line_stats[2]}}{% + #} +{{patch.line_stats[1]}}{# + #} -{{patch.line_stats[2]}}{% if patch.delta.old_file.mode != patch.delta.new_file.mode %}{# #}{# #}{% endif %} diff --git a/scss/main.scss b/scss/main.scss index 31f5317..a5530ee 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -273,7 +273,6 @@ del { } .diff { - ins, del, .lineno { text-decoration: none; } -- 2.38.4