Skip to content

Commit

Permalink
Fix Fomantic's line-height causing vertical scrollbars to appear (#26961
Browse files Browse the repository at this point in the history
)

Before:

![before](https://github.com/go-gitea/gitea/assets/3371163/bc5a3b20-3490-4e14-ab1d-2fcfbc4a2e20)

After:

![after](https://github.com/go-gitea/gitea/assets/3371163/70e8be6a-11a2-46af-9e1e-78ac153cd2a4)

---  

1. **Remove the scroll bar exception that in the a tag**  
2. **Reduce the actual width of the a tag to the actual width of the
content**

![c363a5b5883e105a0c65d7337893b50](https://github.com/go-gitea/gitea/assets/3371163/789d9b83-ad14-46d2-8a1b-df551a063f6a)
As shown in the screenshot, the red box area should not be clickable
  • Loading branch information
kerwin612 authored Sep 13, 2023
1 parent 0989f43 commit a38eca3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/repo/settings/webhook/base_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
{{range .Webhooks}}
<div class="item truncated-item-container">
<span class="text {{if eq .LastStatus 1}}green{{else if eq .LastStatus 2}}red{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span>
<a class="text truncate gt-f1 gt-mr-3" title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a>
<div class="text truncate gt-f1 gt-mr-3">
<a title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a>
</div>
<a class="muted gt-p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
<a class="delete-button gt-p-3" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}}</a>
</div>
Expand Down
8 changes: 8 additions & 0 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,14 @@ a.label,
text-align: start; /* Override fomantic's `text-align: left` to make RTL work via HTML `dir="auto"` */
}

/* fix Fomantic's line-height causing vertical scrollbars to appear */
ul.ui.list li,
ol.ui.list li,
.ui.list > .item,
.ui.list .list > .item {
line-height: var(--line-height-default);
}

.ui.input.focus > input,
.ui.input > input:focus {
border-color: var(--color-primary);
Expand Down

0 comments on commit a38eca3

Please sign in to comment.