diff options
author | silverwind <me@silverwind.io> | 2024-03-31 16:58:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-31 16:58:55 +0200 |
commit | 8da9130c1ffe93e0e97290fddb908ae5b67432e2 (patch) | |
tree | 001327c866e6d6bcfc888089204abbbdd15da7ed | |
parent | ef5892d988f71743c7f5446bc6ce69cb4384455b (diff) | |
download | gitea-8da9130c1ffe93e0e97290fddb908ae5b67432e2.tar.gz gitea-8da9130c1ffe93e0e97290fddb908ae5b67432e2.zip |
Prevent flash of dropdown menu on labels list (#30215)
On the labels list, This `left` class caused the dropdown content to
flash on page load until JS had hidden it. Remove it as I see no purpose
to it.
<img width="215" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/9e1de97f-dd89-41e0-9229-5c4a786ba762">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
-rw-r--r-- | templates/repo/issue/labels/label_list.tmpl | 2 | ||||
-rw-r--r-- | web_src/css/modules/header.css | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/templates/repo/issue/labels/label_list.tmpl b/templates/repo/issue/labels/label_list.tmpl index d84f14242a..8d7fc2c3db 100644 --- a/templates/repo/issue/labels/label_list.tmpl +++ b/templates/repo/issue/labels/label_list.tmpl @@ -8,7 +8,7 @@ {{ctx.Locale.Tr "repo.issues.filter_sort"}} </span> {{svg "octicon-triangle-down" 14 "dropdown icon"}} - <div class="left menu"> + <div class="menu"> <a class="{{if or (eq .SortType "alphabetically") (not .SortType)}}active {{end}}item" href="?sort=alphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> <a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> <a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?sort=leastissues&state={{$.State}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a> diff --git a/web_src/css/modules/header.css b/web_src/css/modules/header.css index 091d536cfc..05381e1185 100644 --- a/web_src/css/modules/header.css +++ b/web_src/css/modules/header.css @@ -135,6 +135,12 @@ h4.ui.header .sub.header { font-weight: var(--font-weight-normal); } +/* open dropdown menus to the left in right-attached headers */ +.ui.attached.header > .ui.right .ui.dropdown .menu { + right: 0; + left: auto; +} + /* if a .top.attached.header is followed by a .segment, add some margin */ .ui.segments + .ui.top.attached.header, .ui.attached.segment + .ui.top.attached.header { |