2024-07-04 19:34:48 +08:00
|
|
|
div.poll-outer {
|
|
|
|
div.poll {
|
|
|
|
margin: 1em 0;
|
|
|
|
border: 1px solid var(--primary-low);
|
|
|
|
display: grid;
|
|
|
|
grid-template-areas: "poll" "info" "buttons";
|
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
grid-template-columns: 1fr 10em;
|
|
|
|
grid-template-areas: "poll info" "buttons buttons";
|
2021-06-04 10:09:59 +08:00
|
|
|
}
|
2018-07-01 13:20:00 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
ul,
|
|
|
|
ol {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2015-05-05 04:29:45 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
li[data-poll-option-id] {
|
|
|
|
color: var(--primary);
|
|
|
|
padding: 0.5em 0;
|
|
|
|
word-break: break-word;
|
|
|
|
button {
|
2024-08-13 02:39:37 +08:00
|
|
|
background-color: transparent;
|
2024-07-04 19:34:48 +08:00
|
|
|
border: none;
|
2024-07-05 21:27:40 +08:00
|
|
|
text-align: left;
|
|
|
|
padding-left: 23px;
|
|
|
|
text-indent: -23px;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-17 17:49:14 +08:00
|
|
|
.ranked-choice-poll-options {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: 0.5em;
|
|
|
|
padding: 0.5em;
|
|
|
|
|
|
|
|
.ranked-choice-poll-option {
|
|
|
|
display: inline-flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-items: center;
|
|
|
|
gap: 0.5em;
|
|
|
|
padding: 0.5em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tabs {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.discourse-poll-ranked_choice-results {
|
|
|
|
.tabs {
|
|
|
|
&.nav-items {
|
|
|
|
display: flex;
|
|
|
|
gap: 0.5em;
|
|
|
|
.nav-btn {
|
|
|
|
background-color: var(--secondary);
|
|
|
|
border: none;
|
|
|
|
color: var(--primary-medium);
|
|
|
|
}
|
|
|
|
.active {
|
|
|
|
.nav-btn {
|
|
|
|
color: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.rank {
|
|
|
|
display: inline-block;
|
|
|
|
min-width: 20px;
|
|
|
|
}
|
|
|
|
.poll-results-ranked_choice-subtitle-rounds {
|
|
|
|
margin: 0.25em 0 0.67rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
img {
|
|
|
|
// Hacky way to stop images without width/height
|
|
|
|
// from causing abrupt unintended scrolling
|
|
|
|
&:not([width]):not(.emoji),
|
|
|
|
&:not([height]):not(.emoji) {
|
|
|
|
width: 200px !important;
|
|
|
|
height: 200px !important;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-info {
|
|
|
|
box-sizing: border-box;
|
|
|
|
grid-area: info;
|
2023-07-06 00:20:18 +08:00
|
|
|
display: flex;
|
2024-07-04 19:34:48 +08:00
|
|
|
line-height: var(--line-height-medium);
|
|
|
|
color: var(--primary-medium);
|
2023-07-06 00:20:18 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
@include breakpoint("mobile-extra-large") {
|
|
|
|
border-top: 1px solid var(--primary-low);
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
&_counts,
|
|
|
|
&_instructions {
|
|
|
|
padding: 1em;
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
gap: 0 1em;
|
|
|
|
padding: 1em;
|
|
|
|
border-left: 1px solid var(--primary-low);
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
&_counts {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
|
|
|
gap: 0.25em 0;
|
2023-07-06 00:20:18 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
justify-content: center;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large") {
|
2024-07-04 19:34:48 +08:00
|
|
|
flex: 1 1 auto;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
&-count {
|
|
|
|
gap: 0.25em;
|
|
|
|
line-height: 1;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-align: left;
|
|
|
|
|
2023-12-06 23:58:06 +08:00
|
|
|
.info-label,
|
|
|
|
.info-number {
|
2024-07-04 19:34:48 +08:00
|
|
|
display: inline;
|
|
|
|
margin-right: 0.25em;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large") {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 0.75em;
|
|
|
|
}
|
2023-12-06 23:58:06 +08:00
|
|
|
}
|
2024-07-04 19:34:48 +08:00
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 0.25em;
|
|
|
|
}
|
2023-12-06 23:58:06 +08:00
|
|
|
display: flex;
|
2024-07-04 19:34:48 +08:00
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
.info-label,
|
|
|
|
.info-number {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
+ .poll-info_counts-count {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: center;
|
2023-12-06 23:58:06 +08:00
|
|
|
min-width: 0;
|
2024-07-04 19:34:48 +08:00
|
|
|
gap: 0 0.33em;
|
|
|
|
margin: 0.5em;
|
|
|
|
.info-number,
|
|
|
|
.info-label {
|
|
|
|
font-size: var(--font-up-1);
|
|
|
|
min-width: 0;
|
|
|
|
white-space: normal;
|
|
|
|
line-height: var(--line-height-medium);
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-07-04 19:34:48 +08:00
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
+ .poll-info_instructions:not(:empty) {
|
|
|
|
margin-top: 1.25em;
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
&_instructions {
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
align-self: start;
|
|
|
|
&:empty {
|
|
|
|
display: none;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
padding-top: 1.25em;
|
|
|
|
&:not(:empty) {
|
|
|
|
border-top: 1px solid var(--primary-low);
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
@include breakpoint("mobile-extra-large") {
|
|
|
|
padding-right: 1em;
|
|
|
|
height: 100%;
|
|
|
|
flex: 1 1 auto;
|
|
|
|
&:not(:empty) {
|
|
|
|
border-right: 1px solid var(--primary-low);
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
li {
|
|
|
|
display: flex;
|
|
|
|
gap: 0.5em;
|
2023-07-06 00:20:18 +08:00
|
|
|
&:not(:last-child) {
|
2024-07-04 19:34:48 +08:00
|
|
|
margin-bottom: 0.5em;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
2024-07-04 19:34:48 +08:00
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 1em;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
2024-07-04 19:34:48 +08:00
|
|
|
&:not(:first-child:last-child) {
|
|
|
|
// only applied when there are multiple items
|
|
|
|
.d-icon {
|
|
|
|
width: 15%;
|
|
|
|
}
|
|
|
|
span {
|
|
|
|
width: 85%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:first-child:last-child {
|
|
|
|
// when there's a single item, it looks better centered
|
|
|
|
display: inline;
|
|
|
|
text-align: center;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
}
|
2024-07-04 19:34:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.d-icon {
|
|
|
|
font-size: var(--font-down-1);
|
|
|
|
margin-top: 0.2em;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.info-text {
|
|
|
|
margin: 0.25em 0;
|
|
|
|
display: block;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
2018-05-03 08:12:19 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
.info-label {
|
|
|
|
font-size: var(--font-up-2);
|
|
|
|
}
|
|
|
|
.info-number {
|
|
|
|
font-size: var(--font-up-6);
|
|
|
|
}
|
|
|
|
}
|
2018-05-03 08:12:19 +08:00
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-container {
|
|
|
|
box-sizing: border-box;
|
|
|
|
grid-area: poll;
|
|
|
|
padding: 1em;
|
|
|
|
width: 100%;
|
|
|
|
overflow: visible;
|
|
|
|
align-self: center;
|
|
|
|
|
|
|
|
li {
|
|
|
|
cursor: pointer;
|
|
|
|
font-size: var(--font-up-1);
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
2015-05-05 04:29:45 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-results-number-rating {
|
|
|
|
font-size: var(--font-up-5);
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
2015-05-05 04:29:45 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-title {
|
|
|
|
border-bottom: 1px solid var(--primary-low);
|
|
|
|
margin-bottom: 0.5em;
|
|
|
|
padding-bottom: 0.5em;
|
2015-05-05 04:29:45 +08:00
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-buttons {
|
|
|
|
box-sizing: border-box;
|
|
|
|
grid-area: buttons;
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
gap: 0.5em;
|
|
|
|
width: 100%;
|
|
|
|
padding: 1em;
|
|
|
|
border-top: 1px solid var(--primary-low);
|
2023-07-06 00:20:18 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
button {
|
|
|
|
white-space: nowrap;
|
|
|
|
align-self: start;
|
|
|
|
.d-button-label {
|
|
|
|
@include ellipsis;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
2024-07-04 19:34:48 +08:00
|
|
|
|
|
|
|
@include breakpoint("tablet") {
|
|
|
|
flex: 1 1 0;
|
|
|
|
&:first-child:last-child {
|
|
|
|
// if there's only one button,
|
|
|
|
// don't expand the width
|
|
|
|
flex: 0 1 auto;
|
|
|
|
}
|
|
|
|
&.toggle-results:first-child {
|
|
|
|
// don't expand the back button
|
|
|
|
flex: 0 1 auto;
|
|
|
|
margin-right: auto;
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
@include breakpoint("mobile-large") {
|
|
|
|
&:first-child:last-child,
|
|
|
|
&.cast-votes {
|
|
|
|
// ok to expand button width on smaller screens
|
|
|
|
flex: 1 1 100%;
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
&:empty {
|
|
|
|
display: none;
|
|
|
|
}
|
2019-03-07 09:27:40 +08:00
|
|
|
}
|
2015-04-24 01:33:29 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-voters:not(:empty) {
|
|
|
|
min-height: 30px;
|
|
|
|
margin-bottom: 0.25em;
|
2020-02-27 18:09:54 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
li {
|
|
|
|
display: inline;
|
|
|
|
}
|
2016-06-07 18:55:01 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-voters-toggle-expand {
|
2024-09-10 23:46:12 +08:00
|
|
|
margin-top: 0.25em;
|
2024-07-04 19:34:48 +08:00
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
2020-02-27 18:09:54 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.spinner {
|
|
|
|
margin-top: 0.25em;
|
|
|
|
}
|
2020-02-27 18:09:54 +08:00
|
|
|
}
|
2016-06-07 18:55:01 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-buttons-dropdown,
|
|
|
|
.export-results,
|
|
|
|
.toggle-status,
|
2024-08-07 17:46:29 +08:00
|
|
|
.show-breakdown,
|
|
|
|
.show-tally,
|
|
|
|
.show-percentage {
|
2024-07-04 19:34:48 +08:00
|
|
|
// we want these controls to be separated
|
|
|
|
// from voting controls
|
|
|
|
margin-left: auto;
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.results {
|
|
|
|
> li {
|
|
|
|
cursor: default;
|
|
|
|
padding: 0.25em 0;
|
|
|
|
&:last-child {
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.option {
|
|
|
|
p {
|
2023-07-06 00:20:18 +08:00
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-07 17:46:29 +08:00
|
|
|
.percentage,
|
|
|
|
.absolute {
|
2024-07-04 19:34:48 +08:00
|
|
|
float: right;
|
|
|
|
color: var(--primary-medium);
|
|
|
|
margin-left: 0.25em;
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.bar-back {
|
|
|
|
background: var(--primary-low);
|
2019-02-05 17:47:22 +08:00
|
|
|
}
|
2024-07-04 19:34:48 +08:00
|
|
|
|
|
|
|
.bar {
|
|
|
|
height: 0.75em;
|
|
|
|
background: var(--primary-medium);
|
2015-06-03 22:49:20 +08:00
|
|
|
}
|
2015-04-24 01:33:29 +08:00
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.chosen .bar {
|
|
|
|
background: var(--tertiary);
|
|
|
|
}
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.pie-chart-legends {
|
|
|
|
justify-content: center;
|
|
|
|
text-align: center;
|
|
|
|
margin-top: 0.5em;
|
|
|
|
|
|
|
|
.legend {
|
|
|
|
align-items: center;
|
|
|
|
cursor: pointer;
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: row;
|
|
|
|
margin-left: 1em;
|
|
|
|
font-size: var(--font-down-0);
|
|
|
|
|
|
|
|
.swatch {
|
|
|
|
margin-right: 0.5em;
|
|
|
|
display: inline-block;
|
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
|
|
|
}
|
|
|
|
}
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-grouped-pies-controls {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
2017-01-25 11:56:39 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 19:34:48 +08:00
|
|
|
.poll-results-chart {
|
|
|
|
overflow-y: auto;
|
|
|
|
overflow-x: hidden;
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-poll-type="number"] {
|
2016-06-07 18:55:01 +08:00
|
|
|
li[data-poll-option-id] {
|
2015-04-24 01:33:29 +08:00
|
|
|
display: inline-block;
|
2018-08-28 04:53:35 +08:00
|
|
|
width: 3.25em;
|
|
|
|
margin-right: 0.25em;
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
}
|
2019-11-26 01:51:01 +08:00
|
|
|
}
|
|
|
|
|
2023-07-06 00:20:18 +08:00
|
|
|
.d-editor-preview {
|
|
|
|
.poll {
|
2024-09-10 16:54:59 +08:00
|
|
|
ul {
|
|
|
|
list-style-type: none;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
2023-07-06 00:20:18 +08:00
|
|
|
li[data-poll-option-id]:before {
|
|
|
|
position: relative;
|
|
|
|
vertical-align: baseline;
|
|
|
|
border: 2px solid var(--primary);
|
|
|
|
border-radius: 50%;
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 0.5em;
|
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-poll-type="multiple"] {
|
|
|
|
li[data-poll-option-id]:before {
|
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
}
|
2019-11-26 01:51:01 +08:00
|
|
|
}
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
2018-11-15 17:40:01 +08:00
|
|
|
|
|
|
|
// hides 0 vote count in crawler and print view
|
|
|
|
body.crawler {
|
|
|
|
.poll {
|
|
|
|
.poll-info,
|
|
|
|
.poll-button {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|