aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-15 00:21:04 +0800
committerGitHub <noreply@github.com>2023-08-14 16:21:04 +0000
commitc91a7e8dbb14f3a1e9f1416c689187cbf1c2c3cf (patch)
tree85d1d4284cff6da8e9895c3fc0b4cba303505c7b
parent19872063a3c14256a1d89b2a104d63e7538a3a28 (diff)
downloadgitea-c91a7e8dbb14f3a1e9f1416c689187cbf1c2c3cf.tar.gz
gitea-c91a7e8dbb14f3a1e9f1416c689187cbf1c2c3cf.zip
Use `object-fit: contain` for oauth2 custom icons (#26493)
-rw-r--r--services/auth/source/oauth2/providers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/auth/source/oauth2/providers.go b/services/auth/source/oauth2/providers.go
index 16620fad6d..7572aa20c0 100644
--- a/services/auth/source/oauth2/providers.go
+++ b/services/auth/source/oauth2/providers.go
@@ -56,7 +56,7 @@ func (p *AuthSourceProvider) DisplayName() string {
func (p *AuthSourceProvider) IconHTML() template.HTML {
if p.iconURL != "" {
- img := fmt.Sprintf(`<img class="gt-mr-3" width="20" height="20" src="%s" alt="%s">`,
+ img := fmt.Sprintf(`<img class="gt-object-contain gt-mr-3" width="20" height="20" src="%s" alt="%s">`,
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
)
return template.HTML(img)