Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply compact padding to small buttons with svg icons #29471

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/repo/release_tag_header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
{{if .EnableFeed}}
<a class="ui small button" href="{{.RepoLink}}/{{if .PageIsTagList}}tags{{else}}releases{{end}}.rss">
{{svg "octicon-rss" 18}} {{ctx.Locale.Tr "rss_feed"}}
{{svg "octicon-rss" 16}} {{ctx.Locale.Tr "rss_feed"}}
</a>
{{end}}
{{if and (not .PageIsTagList) .CanCreateRelease}}
Expand Down
7 changes: 7 additions & 0 deletions web_src/css/modules/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ It needs some tricks to tweak the left/right borders with active state */
box-shadow: none;
}

/* apply the vertical padding of .compact to non-compact buttons when they contain a svg as they
would otherwise appear too large. Seen on "RSS Feed" button on repo releases tab. */
.ui.small.button:not(.compact):has(.svg) {
wxiaoguang marked this conversation as resolved.
Show resolved Hide resolved
padding-top: 0.58928571em;
padding-bottom: 0.58928571em;
}

.ui.labeled.button.disabled > .button,
.ui.basic.buttons .button,
.ui.basic.button,
Expand Down
Loading