]> source.dussan.org Git - gitea.git/commit
Use flex to align SVG and text (#25163) (#25260)
authorGiteabot <teabot@gitea.io>
Wed, 14 Jun 2023 17:21:48 +0000 (13:21 -0400)
committerGitHub <noreply@github.com>
Wed, 14 Jun 2023 17:21:48 +0000 (13:21 -0400)
commit5191ab64453e9e8a52f9e51ee65911b82fa516ec
tree97df064943db4924bc46f15dd12f2f3c8e055b3a
parentbfd3eb9dbcdb7aee5ca640a0321ef93516a21a9c
Use flex to align SVG and text (#25163) (#25260)

Backport #25163 by @wxiaoguang

The code can be as simple as:

```html
<div class="flex-text-block">{{svg "octicon-alert"}} {{svg "octicon-x"}} text (block)</div>
<div><div class="flex-text-inline">{{svg "octicon-alert"}} {{svg "octicon-x"}} text</div> (inline)</div>
<div><button class="ui red button">{{svg "octicon-alert" 24}} {{svg "octicon-x" 24}} text</button></div>
```

![image](https://github.com/go-gitea/gitea/assets/2114189/1d3c10f1-0bc7-4c26-b236-bad537d5c465)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
17 files changed:
templates/devtest/gitea-ui.tmpl
templates/repo/commits_list_small.tmpl
templates/repo/diff/compare.tmpl
templates/repo/issue/branch_selector_field.tmpl
templates/repo/issue/view_content/pull.tmpl
templates/repo/issue/view_content/sidebar.tmpl
templates/repo/issue/view_content/update_branch_by_merge.tmpl
templates/repo/issue/view_title.tmpl
templates/repo/release_tag_header.tmpl
templates/repo/wiki/view.tmpl
web_src/css/base.css
web_src/css/modules/button.css
web_src/css/repo.css
web_src/js/components/DashboardRepoList.vue
web_src/js/components/PullRequestMergeForm.vue
web_src/js/components/RepoBranchTagSelector.vue
web_src/js/features/repo-issue-content.js