Skip to content

Commit 21c3513

Browse files
GiteaBotwxiaoguang
andauthored
Improve dropdown button alignment and fix hover bug (go-gitea#27632) (go-gitea#27637)
Backport go-gitea#27632 by @wxiaoguang 1. fix go-gitea#27631 , and add samples to devtest page 2. fix incorrect color for "ui dropdown button" when hover Co-authored-by: wxiaoguang <[email protected]>
1 parent 8cf7548 commit 21c3513

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

templates/devtest/gitea-ui.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,15 @@
250250
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
251251
</div>
252252
</div>
253+
254+
<div>
255+
<hr>
256+
<div class="ui tiny button">Button align with ...</div>
257+
<div class="ui dropdown tiny button">
258+
<span class="text">... Dropdown Button</span>
259+
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
260+
</div>
261+
</div>
253262
</div>
254263

255264
<div>

web_src/css/base.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,7 @@ table th[data-sortt-desc] .svg {
21942194
height: 15px;
21952195
}
21962196

2197-
.ui.dropdown {
2197+
.ui.dropdown:not(.button) {
21982198
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 */
21992199
}
22002200

web_src/css/modules/button.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,13 @@ It needs some tricks to tweak the left/right borders with active state */
128128
.ui.primary.button:focus,
129129
.ui.primary.buttons .button:focus {
130130
background: var(--color-primary);
131+
color: var(--color-primary-contrast);
131132
}
132133

133134
.ui.primary.button:hover,
134135
.ui.primary.buttons .button:hover {
135136
background: var(--color-primary-hover);
137+
color: var(--color-primary-contrast);
136138
}
137139

138140
.ui.primary.button:active,

0 commit comments

Comments
 (0)