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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

209 lines
3.2 KiB
SCSS
Raw Normal View History

div.poll {
2018-08-27 16:53:35 -04:00
margin: 1em 0;
border: 1px solid var(--primary-low);
2015-05-08 05:13:32 -04:00
2015-07-31 06:42:19 -04:00
@include unselectable;
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
2015-05-04 16:29:45 -04:00
width: 100%;
}
li {
cursor: pointer;
2018-08-27 16:53:35 -04:00
font-size: $font-up-1;
}
li[data-poll-option-id] {
color: var(--primary);
padding: 0.5em 0;
word-break: break-word;
}
img {
// needed to override internal styles in image-sizing hack
max-width: 100% !important;
height: auto;
}
2015-05-04 16:29:45 -04:00
.poll-info {
color: var(--primary-medium);
2015-05-04 16:29:45 -04:00
vertical-align: middle;
2018-08-27 16:53:35 -04:00
padding: 1em 0;
2015-05-04 16:29:45 -04:00
.info-label {
font-size: $font-up-4;
2018-08-27 16:53:35 -04:00
line-height: $line-height-medium;
2015-05-04 16:29:45 -04:00
}
.info-text {
margin: 0.25em 0;
display: block;
}
2015-05-04 16:29:45 -04:00
}
.poll-container {
2015-05-04 16:29:45 -04:00
vertical-align: middle;
padding: 0.5em 1em;
2015-05-04 16:29:45 -04:00
2016-06-09 09:33:17 -04:00
.poll-results-number-rating {
font-size: $font-up-5;
2015-05-04 16:29:45 -04:00
}
}
.poll-buttons {
.info-text {
margin: 0.25em 0;
color: var(--primary-medium);
}
2019-03-06 20:27:40 -05:00
.info-text + .info-text,
button + .info-text {
margin-left: 0.5em;
}
}
.poll-voters:not(:empty) {
min-height: 30px;
margin-bottom: 0.25em;
2016-06-07 06:55:01 -04:00
li {
display: inline;
}
}
.poll-voters-toggle-expand {
2016-06-09 09:33:17 -04:00
width: 100%;
2016-06-07 06:55:01 -04:00
text-align: center;
.spinner {
margin-top: 0.25em;
}
2016-06-07 06:55:01 -04:00
}
.results {
2018-08-29 09:11:03 -04:00
> li {
cursor: default;
padding: 0.25em 0;
&:last-child {
padding-bottom: 0;
}
2018-08-27 16:53:35 -04:00
}
.option {
p {
margin: 0;
}
}
.percentage {
float: right;
color: var(--primary-medium);
2018-08-27 16:53:35 -04:00
margin-left: 0.25em;
}
.bar-back {
background: var(--primary-low);
}
.bar {
2018-08-27 16:53:35 -04:00
height: 0.75em;
background: var(--primary-medium);
2017-01-24 22:56:39 -05:00
}
.chosen .bar {
background: var(--tertiary);
}
}
&[data-poll-type="number"] {
2016-06-07 06:55:01 -04:00
li[data-poll-option-id] {
display: inline-block;
2018-08-27 16:53:35 -04:00
width: 3.25em;
margin-right: 0.25em;
}
}
.pie-chart-legends {
text-align: center;
margin: 10px 0;
.legend {
display: inline-block;
margin: 4px 0 4px 14px;
.swatch {
display: inline-block;
width: 24px;
height: 12px;
margin-right: 4px;
}
}
}
.poll-grouped-pies-controls {
display: flex;
justify-content: space-between;
}
.poll-results-chart {
height: 310px;
overflow-y: auto;
overflow-x: hidden;
}
.poll-group-by-toggle {
margin-bottom: 10px;
}
.poll-group-by-selector {
height: 30px;
}
.poll-grouped-pie-container {
display: inline-block;
position: relative;
padding: 15px 0;
.poll-pie-label {
display: block;
text-align: center;
}
}
}
div.poll.pie {
.poll-container {
display: inline-block;
height: 310px;
max-height: 310px;
overflow-y: auto;
.poll-grouped-pie-container {
width: 50%;
}
}
.poll-info {
display: inline-block;
width: 150px;
}
}
// hides 0 vote count in crawler and print view
body.crawler {
.poll {
.poll-info,
.poll-button {
display: none;
}
}
}
.poll-ui-builder {
.poll-date input {
height: 30px;
}
}