UX: Integrate text with button to improve spacing

UX: Integrate text with button to improve spacing

diff --git a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6
index dd00659..30578bc 100644
--- a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6
+++ b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6
@@ -96,9 +96,7 @@ function initializeWithApi(api, container) {
         title: "solved.accept_answer",
         className: "unaccepted",
         position,
-        afterButton(h) {
-          return h("span.unaccepted", I18n.t("solved.mark_as_solution"));
-        }
+        label: "solved.mark_as_solution"
       };
     } else if (attrs.accepted_answer) {
       return {
@@ -107,9 +105,7 @@ function initializeWithApi(api, container) {
         title: "solved.accept_answer",
         className: "accepted",
         position: "first",
-        afterButton(h) {
-          return h("span.accepted", I18n.t("solved.solution"));
-        }
+        label: "solved.solution"
       };
     }
   });
diff --git a/assets/stylesheets/mobile/solutions.scss b/assets/stylesheets/mobile/solutions.scss
index e391a72..1953e53 100644
--- a/assets/stylesheets/mobile/solutions.scss
+++ b/assets/stylesheets/mobile/solutions.scss
@@ -1,3 +1,9 @@
 #topic-title .d-icon-far-check-square {
   margin-top: 0.25em;
 }
+
+.accepted {
+  .d-button-label {
+    display: none;
+  }
+}
diff --git a/assets/stylesheets/solutions.scss b/assets/stylesheets/solutions.scss
index 27d7813..b2ef4e7 100644
--- a/assets/stylesheets/solutions.scss
+++ b/assets/stylesheets/solutions.scss
@@ -50,13 +50,15 @@
   }
 }
 
-.post-controls .unaccepted {
-  color: dark-light-choose($primary-low-mid, $secondary-high);
-}
-
-.post-controls span:not(.d-button-label) {
-  display: inline-flex;
-  align-items: center;
+.post-controls {
+  .unaccepted,
+  .accepted {
+    &.btn-icon-text {
+      .d-icon {
+        margin-right: 0.3em;
+      }
+    }
+  }
 }
 
 .post-controls .accepted-text {

GitHub sha: ad4bae2f

1 Like

Revert "UX: Integrate text with button to improve spacing"