Skip to content

Commit 94aad35

Browse files
authored
Fix right-aligned input icons (#30301)
Fix regression from #30194 where right-aligned items would not display correctly. Before and After: <img width="285" alt="Screenshot 2024-04-06 at 01 12 11" src="https://github.com/go-gitea/gitea/assets/115237/f9168db5-0f69-4b5d-ba17-b60145ac4a09"> <img width="285" alt="Screenshot 2024-04-06 at 01 11 49" src="https://github.com/go-gitea/gitea/assets/115237/639ab6ed-d018-4e3a-9980-1f079e4ebe9d"> Frontpage search tweaked to accommodate (which was the reason for the changes that broken above): <img width="445" alt="Screenshot 2024-04-06 at 01 11 34" src="https://github.com/go-gitea/gitea/assets/115237/1919220b-390e-463a-8e3d-33a3556bf111"> <img width="438" alt="Screenshot 2024-04-06 at 01 11 39" src="https://github.com/go-gitea/gitea/assets/115237/fd94f8e4-1d56-4b04-99e3-1cd240bd7ab4">
1 parent bbe5cd7 commit 94aad35

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

web_src/css/modules/input.css

+8-3
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@
4848
cursor: default;
4949
position: absolute;
5050
text-align: center;
51-
top: 50%;
52-
transform: translateY(-50%);
51+
top: 0;
52+
right: 0;
53+
margin: 0;
54+
height: 100%;
55+
width: 2.67142857em;
5356
opacity: 0.5;
5457
border-radius: 0 0.28571429rem 0.28571429rem 0;
5558
pointer-events: none;
@@ -58,6 +61,8 @@
5861

5962
.ui.icon.input > i.icon.is-loading {
6063
position: absolute !important;
64+
height: 28px;
65+
top: 4px;
6166
}
6267

6368
.ui.icon.input > i.icon.is-loading > * {
@@ -78,7 +83,7 @@
7883

7984
.ui[class*="left icon"].input > i.icon {
8085
right: auto;
81-
left: 8px;
86+
left: 1px;
8287
border-radius: 0.28571429rem 0 0 0.28571429rem;
8388
}
8489
.ui[class*="left icon"].input > i.circular.icon {

0 commit comments

Comments
 (0)