mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-04 18:57:36 +00:00
enhance: improve diff contrast in light and dark themes (#37477)
Fixes https://github.com/go-gitea/gitea/issues/37448 Adjust the diff stat counter and syntax colors in both light and dark themes to github-like colors that meet a >= 5:1 contrast floor (>= 7:1 for syntax names on diff rows), and make the counters semibold. --------- Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com> Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com> Co-authored-by: Hermes Agent (GPT-5.5) <hermes-agent@nousresearch.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Hermes Agent <hermes@noreply.local> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
{{if or .Addition .Deletion}}
|
||||
<div class="flex-text-block tw-flex-shrink-0 tw-text-[13px] {{if .Classes}}{{.Classes}}{{end}}">
|
||||
<span>
|
||||
{{if .Addition}}<span class="tw-text-diff-added-fg">+{{.Addition}}</span>{{end}}
|
||||
{{if .Deletion}}<span class="tw-text-diff-removed-fg">-{{.Deletion}}</span>{{end}}
|
||||
{{if .Addition}}<strong class="tw-text-diff-added-fg">+{{.Addition}}</strong>{{end}}
|
||||
{{if .Deletion}}<strong class="tw-text-diff-removed-fg">-{{.Deletion}}</strong>{{end}}
|
||||
</span>
|
||||
<span class="diff-stats-bar" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.stats_desc_file" (Eval .Addition "+" .Deletion) .Addition .Deletion}}">
|
||||
{{/* if the denominator is zero, then the float result is "width: NaNpx", as before, it just works */}}
|
||||
|
||||
Reference in New Issue
Block a user