discourse/plugins/poll/assets/stylesheets/common/poll.scss

132 lines
2.0 KiB
SCSS

div.poll {
margin: 1em 0;
border: 1px solid $primary-low;
@include unselectable;
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
width: 100%;
}
li {
cursor: pointer;
font-size: $font-up-1;
}
li[data-poll-option-id] {
color: $primary;
padding: 0.5em 0;
}
img {
// needed to override internal styles in image-sizing hack
max-width: 100% !important;
height: auto;
}
.poll-info {
color: $primary-medium;
vertical-align: middle;
padding: 1em 0;
.info-label {
font-size: $font-up-4;
line-height: $line-height-medium;
}
.info-text {
margin: 0.25em 0;
display: block;
}
}
.poll-container {
vertical-align: middle;
padding: 0.5em 1em;
.poll-results-number-rating {
font-size: $font-up-5;
}
}
.poll-buttons {
.info-text {
margin: 0.25em 0;
color: $primary-medium;
}
.info-text + .info-text,
button + .info-text {
margin-left: 0.5em;
}
}
.poll-voters:not(:empty) {
margin-bottom: 0.25em;
li {
display: inline;
}
}
.poll-voters-toggle-expand {
width: 100%;
text-align: center;
}
.results {
> li {
cursor: default;
padding: 0.25em 0;
&:last-child {
padding-bottom: 0;
}
}
.option {
p {
margin: 0;
}
}
.percentage {
float: right;
color: $primary-medium;
margin-left: 0.25em;
}
.bar-back {
background: $primary-low;
}
.bar {
height: 0.75em;
background: $primary-medium;
}
.chosen .bar {
background: $tertiary;
}
}
&[data-poll-type="number"] {
li[data-poll-option-id] {
display: inline-block;
width: 3.25em;
margin-right: 0.25em;
}
}
}
// hides 0 vote count in crawler and print view
body.crawler {
.poll {
.poll-info,
.poll-button {
display: none;
}
}
}