UI: apply margin only if the menu has content (#9857)

UI: apply margin only if the menu has content (#9857)

diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss
index 54aa976..55b9063 100644
--- a/app/assets/stylesheets/common/base/topic-post.scss
+++ b/app/assets/stylesheets/common/base/topic-post.scss
@@ -1012,13 +1012,15 @@ a.mention-group {
     display: flex;
     flex-wrap: wrap;
 
-    > .btn,
-    .topic-admin-menu-button-container {
+    > .btn {
+      display: inline-flex;
       margin: 0 0.5em 0.5em 0;
     }
 
-    .topic-admin-menu-button-container {
+    .topic-admin-menu-button-container > span:not(:empty) {
       display: inline-flex;
+      margin: 0 0 0.5em 0;
+      margin-right: 0.5em;
     }
   }
 

GitHub sha: e71f5e89

This commit appears in #9857 which was merged by jjaffeux.

This commit has been mentioned on Discourse Meta. There might be relevant details there: