This reverts commit b75d2f0e03317c9b37dfdb702f3a959555309890.
This commit has some issues:
- It uses <ins>/<del> 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 <ins>/<del>, 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 <ins>/<del> 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')}}</a>{#
- #} <span class="pull-right"><ins class="text-success">+{{patch.line_stats[1]}}</ins>{#- #} <del class="text-danger">-{{patch.line_stats[2]}}</del></span>{%+ #} <span class="pull-right"><span class="text-success">+{{patch.line_stats[1]}}</span>{#+ #} <span class="text-danger">-{{patch.line_stats[2]}}</span></span>{% if patch.delta.old_file.mode != patch.delta.new_file.mode %}{#
#}{#
#}{% endif %}</pre>
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.1
[PATCH git.sr.ht 2/2] Revert "Fix text-decoration for <del> tag"
Export this patch
This reverts commit 390e609e533048007e73b8cd587d1923989e7373.
The approach was too heavy-handed. It messes with folks who use <del> in
their README. The commit that introduced the issue that the reverted
commit was trying to address has itself been reverted.
---
scss/main.scss | 4 ----
1 file changed, 4 deletions(-)
diff --git a/scss/main.scss b/scss/main.scss
index a5530ee..c9120d1 100644
--- a/scss/main.scss+++ b/scss/main.scss
@@ -26,10 +26,6 @@ dt {
overflow-wrap: break-word;
}
-del {- text-decoration: underline;-}-.licenses {
text-align: right;
a {
--
2.38.1