~edwargix/git.sr.ht

09128ad3adddb9cc1274a219757590416473ceba — Conrad Hoffmann 1 year, 6 months ago 03671cc
Revert "Change markup for diff insert/delete lines"

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.
2 files changed, 2 insertions(+), 3 deletions(-)

M gitsrht/templates/utils.html
M scss/main.scss
M gitsrht/templates/utils.html => gitsrht/templates/utils.html +2 -2
@@ 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>

M scss/main.scss => scss/main.scss +0 -1
@@ 273,7 273,6 @@ del {
}

.diff {
  ins, del,
  .lineno {
    text-decoration: none;
  }