discourse/plugins/poll/assets/stylesheets/common/poll.scss
Régis Hanol 4459665dee
REFACTOR: use tables instead of custom fields for polls (#6359)
Co-authored-by: Guo Xiang Tan <tgx_world@hotmail.com>
2018-11-19 14:50:00 +01:00

130 lines
1.9 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;
&:not(:last-of-type) {
margin-bottom: 0.5em;
}
}
li[data-poll-option-id] {
color: $primary;
padding: 0.5em 0.7em 0.7em 0.5em;
}
img {
max-width: 100% !important; /* needed to override internal styles */
height: auto;
margin-top: 0.25em;
}
.poll-info {
color: $primary-medium;
vertical-align: middle;
padding: 1em 0;
.info-label {
font-size: 1.7em;
line-height: $line-height-medium;
}
.info-text {
margin: 5px 0;
display: block;
}
}
.poll-container {
vertical-align: middle;
padding: 0.8em;
.poll-results-number-rating {
font-size: 2em;
}
}
.poll-buttons {
.info-text {
margin: 0 5px;
color: $primary-medium;
}
}
.poll-voters-list {
margin-top: 0.25em;
li {
display: inline;
}
}
.poll-voters-toggle-expand {
width: 100%;
text-align: center;
}
.results {
> li {
cursor: default;
padding: 0.5em 0.7em 0.7em 0.5em;
}
.option {
padding-bottom: 0.25em;
p {
margin: 0;
}
}
.percentage {
font-size: $font-up-1;
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;
}
}
}