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

132 lines
2.0 KiB
SCSS
Raw Normal View History

div.poll {
2018-08-28 04:53:35 +08:00
margin: 1em 0;
2018-08-04 05:43:07 +08:00
border: 1px solid $primary-low;
2015-05-08 17:13:32 +08:00
2015-07-31 18:42:19 +08:00
@include unselectable;
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
2015-05-05 04:29:45 +08:00
width: 100%;
}
li {
cursor: pointer;
2018-08-28 04:53:35 +08:00
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;
2018-08-28 04:53:35 +08:00
margin-top: 0.25em;
}
2015-05-05 04:29:45 +08:00
.poll-info {
2018-08-04 05:43:07 +08:00
color: $primary-medium;
2015-05-05 04:29:45 +08:00
vertical-align: middle;
2018-08-28 04:53:35 +08:00
padding: 1em 0;
2015-05-05 04:29:45 +08:00
.info-label {
2015-05-05 04:29:45 +08:00
font-size: 1.7em;
2018-08-28 04:53:35 +08:00
line-height: $line-height-medium;
2015-05-05 04:29:45 +08:00
}
.info-text {
margin: 5px 0;
display: block;
}
2015-05-05 04:29:45 +08:00
}
.poll-container {
2015-05-05 04:29:45 +08:00
vertical-align: middle;
2018-08-28 04:53:35 +08:00
padding: 0.8em;
2015-05-05 04:29:45 +08:00
2016-06-09 21:33:17 +08:00
.poll-results-number-rating {
2015-05-05 04:29:45 +08:00
font-size: 2em;
}
}
.poll-buttons {
2015-05-06 02:14:38 +08:00
button {
float: none;
}
.info-text {
margin: 0 5px;
2018-08-04 05:43:07 +08:00
color: $primary-medium;
}
}
2016-06-07 18:55:01 +08:00
.poll-voters-list {
2018-08-28 04:53:35 +08:00
margin-top: 0.25em;
2016-06-07 18:55:01 +08:00
li {
display: inline;
}
}
.poll-voters-toggle-expand {
2016-06-09 21:33:17 +08:00
width: 100%;
2016-06-07 18:55:01 +08:00
text-align: center;
}
.results {
2018-08-29 21:11:03 +08:00
> li {
2018-08-28 04:53:35 +08:00
padding: 0.5em 0.7em 0.7em 0.5em;
}
.option {
2018-08-28 04:53:35 +08:00
padding-bottom: 0.25em;
p {
margin: 0;
}
}
.percentage {
2018-08-28 04:53:35 +08:00
font-size: $font-up-1;
float: right;
2018-08-04 05:43:07 +08:00
color: $primary-medium;
2018-08-28 04:53:35 +08:00
margin-left: 0.25em;
}
.bar-back {
2018-08-04 05:43:07 +08:00
background: $primary-low;
}
.bar {
2018-08-28 04:53:35 +08:00
height: 0.75em;
2018-08-04 05:43:07 +08:00
background: $primary-medium;
2017-01-25 11:56:39 +08:00
}
.chosen .bar {
background: $tertiary;
}
}
&[data-poll-type="number"] {
2016-06-07 18:55:01 +08:00
li[data-poll-option-id] {
display: inline-block;
2018-08-28 04:53:35 +08:00
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;
}
}
}