diff options
author | Giteabot <teabot@gitea.io> | 2023-10-16 16:15:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-16 16:15:15 +0800 |
commit | 21c3513d494724d7262c746836dd3258e225b44f (patch) | |
tree | 99c01a821bce4a66824f30d009a07ad7aad372bd | |
parent | 8cf7548a182f4d0615c903b8f4b36a1dbdb63bcf (diff) | |
download | gitea-21c3513d494724d7262c746836dd3258e225b44f.tar.gz gitea-21c3513d494724d7262c746836dd3258e225b44f.zip |
Improve dropdown button alignment and fix hover bug (#27632) (#27637)
Backport #27632 by @wxiaoguang
1. fix #27631 , and add samples to devtest page
2. fix incorrect color for "ui dropdown button" when hover
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
-rw-r--r-- | templates/devtest/gitea-ui.tmpl | 9 | ||||
-rw-r--r-- | web_src/css/base.css | 2 | ||||
-rw-r--r-- | web_src/css/modules/button.css | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl index fa74ed7ce6..73293ddf48 100644 --- a/templates/devtest/gitea-ui.tmpl +++ b/templates/devtest/gitea-ui.tmpl @@ -250,6 +250,15 @@ {{svg "octicon-triangle-down" 14 "dropdown icon"}} </div> </div> + + <div> + <hr> + <div class="ui tiny button">Button align with ...</div> + <div class="ui dropdown tiny button"> + <span class="text">... Dropdown Button</span> + {{svg "octicon-triangle-down" 14 "dropdown icon"}} + </div> + </div> </div> <div> diff --git a/web_src/css/base.css b/web_src/css/base.css index 1a4e9d16a1..87912179a4 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -2194,7 +2194,7 @@ table th[data-sortt-desc] .svg { height: 15px; } -.ui.dropdown { +.ui.dropdown:not(.button) { line-height: var(--line-height-default); /* the dropdown doesn't have default line-height, use this to make the dropdown icon align with plain dropdown */ } diff --git a/web_src/css/modules/button.css b/web_src/css/modules/button.css index 0d30249c9c..36cb499aeb 100644 --- a/web_src/css/modules/button.css +++ b/web_src/css/modules/button.css @@ -128,11 +128,13 @@ It needs some tricks to tweak the left/right borders with active state */ .ui.primary.button:focus, .ui.primary.buttons .button:focus { background: var(--color-primary); + color: var(--color-primary-contrast); } .ui.primary.button:hover, .ui.primary.buttons .button:hover { background: var(--color-primary-hover); + color: var(--color-primary-contrast); } .ui.primary.button:active, |