Skip to content

Commit

Permalink
Fix right-aligned input icons (#30301)
Browse files Browse the repository at this point in the history
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">
  • Loading branch information
silverwind authored Apr 7, 2024
1 parent bbe5cd7 commit 94aad35
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions web_src/css/modules/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@
cursor: default;
position: absolute;
text-align: center;
top: 50%;
transform: translateY(-50%);
top: 0;
right: 0;
margin: 0;
height: 100%;
width: 2.67142857em;
opacity: 0.5;
border-radius: 0 0.28571429rem 0.28571429rem 0;
pointer-events: none;
Expand All @@ -58,6 +61,8 @@

.ui.icon.input > i.icon.is-loading {
position: absolute !important;
height: 28px;
top: 4px;
}

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

.ui[class*="left icon"].input > i.icon {
right: auto;
left: 8px;
left: 1px;
border-radius: 0.28571429rem 0 0 0.28571429rem;
}
.ui[class*="left icon"].input > i.circular.icon {
Expand Down

0 comments on commit 94aad35

Please sign in to comment.