From d3babfddd33038bd9fb93fdbd3f8e9e79607eb1d Mon Sep 17 00:00:00 2001 From: Kris Date: Thu, 18 Jul 2019 10:55:44 -0400 Subject: [PATCH] Revert "UX: Integrate text with button to improve spacing" This reverts commit ad4bae2f4ddb9d002f269deec6a881db81f76875. --- .../initializers/extend-for-solved-button.js.es6 | 8 ++++++-- assets/stylesheets/mobile/solutions.scss | 6 ------ assets/stylesheets/solutions.scss | 16 +++++++--------- 3 files changed, 13 insertions(+), 17 deletions(-) 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 30578bc..dd00659 100644 --- a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 +++ b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 @@ -96,7 +96,9 @@ function initializeWithApi(api, container) { title: "solved.accept_answer", className: "unaccepted", position, - label: "solved.mark_as_solution" + afterButton(h) { + return h("span.unaccepted", I18n.t("solved.mark_as_solution")); + } }; } else if (attrs.accepted_answer) { return { @@ -105,7 +107,9 @@ function initializeWithApi(api, container) { title: "solved.accept_answer", className: "accepted", position: "first", - label: "solved.solution" + afterButton(h) { + return h("span.accepted", I18n.t("solved.solution")); + } }; } }); diff --git a/assets/stylesheets/mobile/solutions.scss b/assets/stylesheets/mobile/solutions.scss index 1953e53..e391a72 100644 --- a/assets/stylesheets/mobile/solutions.scss +++ b/assets/stylesheets/mobile/solutions.scss @@ -1,9 +1,3 @@ #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 b2ef4e7..27d7813 100644 --- a/assets/stylesheets/solutions.scss +++ b/assets/stylesheets/solutions.scss @@ -50,15 +50,13 @@ } } -.post-controls { - .unaccepted, - .accepted { - &.btn-icon-text { - .d-icon { - margin-right: 0.3em; - } - } - } +.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 .accepted-text {