UX: Poll style fix, button classes

This commit is contained in:
Kris
2019-03-06 20:27:40 -05:00
parent 9d3c7d7b25
commit be5e889b1b
3 changed files with 11 additions and 5 deletions

View File

@@ -420,7 +420,9 @@ createWidget("discourse-poll-buttons", {
const castVotesDisabled = !attrs.canCastVotes;
contents.push(
this.attach("button", {
className: `btn cast-votes ${castVotesDisabled ? "" : "btn-primary"}`,
className: `btn cast-votes ${
castVotesDisabled ? "btn-default" : "btn-primary"
}`,
label: "poll.cast-votes.label",
title: "poll.cast-votes.title",
disabled: castVotesDisabled,
@@ -433,7 +435,7 @@ createWidget("discourse-poll-buttons", {
if (attrs.showResults || hideResultsDisabled) {
contents.push(
this.attach("button", {
className: "btn toggle-results",
className: "btn btn-default toggle-results",
label: "poll.hide-results.label",
title: "poll.hide-results.title",
icon: "far-eye-slash",
@@ -449,7 +451,7 @@ createWidget("discourse-poll-buttons", {
} else {
contents.push(
this.attach("button", {
className: "btn toggle-results",
className: "btn btn-default toggle-results",
label: "poll.show-results.label",
title: "poll.show-results.title",
icon: "far-eye",
@@ -492,7 +494,7 @@ createWidget("discourse-poll-buttons", {
if (!attrs.isAutomaticallyClosed) {
contents.push(
this.attach("button", {
className: "btn toggle-status",
className: "btn btn-default toggle-status",
label: "poll.open.label",
title: "poll.open.title",
icon: "unlock-alt",

View File

@@ -59,6 +59,10 @@ div.poll {
margin: 0.25em 0;
color: $primary-medium;
}
.info-text + .info-text,
button + .info-text {
margin-left: 0.5em;
}
}
.poll-voters:not(:empty) {