~edwargix/git.sr.ht

da5c399552e266e73df787986a0a61db344eb7e7 — Drew DeVault 6 years ago 142b8fd
accessibility: improve contrast of diffs
2 files changed, 9 insertions(+), 3 deletions(-)

M gitsrht/templates/utils.html
M scss/main.scss
M gitsrht/templates/utils.html => gitsrht/templates/utils.html +2 -0
@@ 168,6 168,8 @@ endif %}{% endfor %}
  }).get(line.origin) or ""}}"><a
    href="#{{anchor}}{{patch.delta.old_file.path}}-{{hunk_index}}-{{loop.index}}"
    id="{{anchor}}{{patch.delta.old_file.path}}-{{hunk_index}}-{{loop.index}}"
    aria-hidden="true"
    class="lineno"
    style="color: inherit"
>{{line.origin}}</a>{{line.content}}{#
#}</span>{% endfor %}

M scss/main.scss => scss/main.scss +7 -3
@@ 159,12 159,16 @@ pre {
}

.diff {
  .text-danger {
    color: darken($danger, 10) !important;
  .lineno {
    text-decoration: none;
  }

  .text-success {
    color: darken($success, 10) !important;
    color: color_adjust_contrast_AERT(darken($success, 10), white) !important;
  }

  .text-danger {
    color: color_adjust_contrast_AERT(darken($danger, 10), white) !important;
  }
}