UX: Integrate text with button to improve spacing

This commit is contained in:
Kris 2019-07-16 11:08:05 -04:00
parent 33a28ced7e
commit ad4bae2f4d
3 changed files with 17 additions and 13 deletions

View File

@ -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"
};
}
});

View File

@ -1,3 +1,9 @@
#topic-title .d-icon-far-check-square {
margin-top: 0.25em;
}
.accepted {
.d-button-label {
display: none;
}
}

View File

@ -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 {