Skip to content

Commit 6c501b1

Browse files
authored
Improve dropdown button alignment and fix hover bug (#27632)
1. fix #27631 , and add samples to devtest page 2. fix incorrect color for "ui dropdown button" when hover
1 parent d1f8552 commit 6c501b1

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
@@ -1952,7 +1952,7 @@ table th[data-sortt-desc] .svg {
19521952
height: 15px;
19531953
}
19541954

1955-
.ui.dropdown {
1955+
.ui.dropdown:not(.button) {
19561956
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 */
19571957
}
19581958

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)