1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Improve flex list UI (#26970)

1. There is already `gt-ac`, so no need to introduce `flex-item-center`
2. The `flex-item-baseline` and `.flex-item-icon svg { margin-top: 1px
}` seem to be a tricky patch, they don't resolve the root problem, and
still cause misalignment in some cases.
* The root problem is: the "icon" needs to align with the sibling
"title"
    * So, make the "icon" and the "title" both have the same height 
3. `flex-text-inline` could only be used if the element is really
"inline", otherwise its `vertical-align` would make the box size change.
In most cases, `flex-text-block` is good enough.


![image](https://github.com/go-gitea/gitea/assets/2114189/1b7acfc2-b1c7-4e9c-a983-2fa932026479)

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
wxiaoguang
2023-09-08 21:57:18 +08:00
committed by GitHub
parent 4807f7be22
commit ffa4949eaa
14 changed files with 23 additions and 26 deletions

View File

@ -4,7 +4,7 @@
{{.locale.Tr "settings.oauth2_application_create_description"}}
</div>
{{range .Applications}}
<div class="flex-item flex-item-center">
<div class="flex-item gt-ac">
<div class="flex-item-leading">
{{svg "octicon-apps" 32}}
</div>

View File

@ -7,7 +7,7 @@
{{.locale.Tr "settings.openid_desc"}}
</div>
{{range .OpenIDs}}
<div class="flex-item flex-item-center">
<div class="flex-item gt-ac">
<div class="flex-item-leading">
{{svg "fontawesome-openid" 20}}
</div>