From 27dff2dd602023d7dc8c2c79f470adc7859cfc3e Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 28 Feb 2024 15:29:08 +0100 Subject: [PATCH 1/2] Apply compact padding to buttons with svg icons --- templates/repo/release_tag_header.tmpl | 2 +- web_src/css/modules/button.css | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/repo/release_tag_header.tmpl b/templates/repo/release_tag_header.tmpl index f474fb89ead81..31c151da08f39 100644 --- a/templates/repo/release_tag_header.tmpl +++ b/templates/repo/release_tag_header.tmpl @@ -13,7 +13,7 @@ {{if .EnableFeed}} - {{svg "octicon-rss" 18}} {{ctx.Locale.Tr "rss_feed"}} + {{svg "octicon-rss" 16}} {{ctx.Locale.Tr "rss_feed"}} {{end}} {{if and (not .PageIsTagList) .CanCreateRelease}} diff --git a/web_src/css/modules/button.css b/web_src/css/modules/button.css index 36cb499aebc0e..10e341c474e38 100644 --- a/web_src/css/modules/button.css +++ b/web_src/css/modules/button.css @@ -85,6 +85,12 @@ It needs some tricks to tweak the left/right borders with active state */ box-shadow: none; } +/* apply the 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) { + padding: 0.58928571em 1.125em 0.58928571em; +} + .ui.labeled.button.disabled > .button, .ui.basic.buttons .button, .ui.basic.button, From f5517120782f57d50aed03773e5a0cb5b3cd131e Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 28 Feb 2024 15:38:56 +0100 Subject: [PATCH 2/2] only change vertical padding --- web_src/css/modules/button.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web_src/css/modules/button.css b/web_src/css/modules/button.css index 10e341c474e38..26f8fcf94c17c 100644 --- a/web_src/css/modules/button.css +++ b/web_src/css/modules/button.css @@ -85,10 +85,11 @@ It needs some tricks to tweak the left/right borders with active state */ box-shadow: none; } -/* apply the 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. */ +/* 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) { - padding: 0.58928571em 1.125em 0.58928571em; + padding-top: 0.58928571em; + padding-bottom: 0.58928571em; } .ui.labeled.button.disabled > .button,