2015-04-24 01:33:29 +08:00
|
|
|
div.poll {
|
2023-07-06 00:20:18 +08:00
|
|
|
> * {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
2018-08-28 04:53:35 +08:00
|
|
|
margin: 1em 0;
|
2020-08-04 23:14:33 +08:00
|
|
|
border: 1px solid var(--primary-low);
|
2023-07-06 00:20:18 +08:00
|
|
|
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";
|
|
|
|
}
|
2015-05-08 17:13:32 +08:00
|
|
|
|
2018-06-08 17:49:31 +08:00
|
|
|
ul,
|
|
|
|
ol {
|
2015-04-24 01:33:29 +08:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
display: inline-block;
|
2015-05-05 04:29:45 +08:00
|
|
|
width: 100%;
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
li[data-poll-option-id] {
|
2020-08-04 23:14:33 +08:00
|
|
|
color: var(--primary);
|
2019-02-05 17:47:22 +08:00
|
|
|
padding: 0.5em 0;
|
2019-08-13 21:49:40 +08:00
|
|
|
word-break: break-word;
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
|
2018-07-01 13:20:00 +08:00
|
|
|
img {
|
2021-06-04 10:09:59 +08:00
|
|
|
// Hacky way to stop images without width/height
|
|
|
|
// from causing abrupt unintended scrolling
|
2021-06-05 06:27:25 +08:00
|
|
|
&:not([width]):not(.emoji),
|
|
|
|
&:not([height]):not(.emoji) {
|
2021-06-04 10:09:59 +08:00
|
|
|
width: 200px !important;
|
|
|
|
height: 200px !important;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
2018-07-01 13:20:00 +08:00
|
|
|
}
|
|
|
|
|
2015-05-05 04:29:45 +08:00
|
|
|
.poll-info {
|
2023-07-06 00:20:18 +08:00
|
|
|
grid-area: info;
|
|
|
|
display: flex;
|
|
|
|
line-height: var(--line-height-medium);
|
2020-08-04 23:14:33 +08:00
|
|
|
color: var(--primary-medium);
|
2015-05-05 04:29:45 +08:00
|
|
|
|
2023-07-06 00:20:18 +08:00
|
|
|
@include breakpoint("mobile-extra-large") {
|
|
|
|
border-top: 1px solid var(--primary-low);
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
&_counts,
|
|
|
|
&_instructions {
|
|
|
|
padding: 1em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@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;
|
|
|
|
}
|
|
|
|
|
|
|
|
&_counts {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-items: center;
|
2023-12-06 23:58:06 +08:00
|
|
|
width: 100%;
|
2023-07-06 00:20:18 +08:00
|
|
|
gap: 0.25em 0;
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large") {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-count {
|
|
|
|
gap: 0.25em;
|
|
|
|
line-height: 1;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
.info-label,
|
|
|
|
.info-number {
|
|
|
|
display: inline;
|
|
|
|
margin-right: 0.25em;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large") {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 0.75em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 0.25em;
|
|
|
|
}
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
2023-12-06 23:58:06 +08:00
|
|
|
.info-label,
|
|
|
|
.info-number {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
+ .poll-info_counts-count {
|
2023-12-06 23:58:06 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: center;
|
|
|
|
min-width: 0;
|
|
|
|
gap: 0 0.33em;
|
|
|
|
margin: 0.5em;
|
2023-07-06 00:20:18 +08:00
|
|
|
.info-number,
|
|
|
|
.info-label {
|
|
|
|
font-size: var(--font-up-1);
|
2023-12-06 23:58:06 +08:00
|
|
|
min-width: 0;
|
|
|
|
white-space: normal;
|
|
|
|
line-height: var(--line-height-medium);
|
2023-07-06 00:20:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
+ .poll-info_instructions:not(:empty) {
|
|
|
|
margin-top: 1.25em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&_instructions {
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
align-self: start;
|
|
|
|
&:empty {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
padding-top: 1.25em;
|
|
|
|
&:not(:empty) {
|
|
|
|
border-top: 1px solid var(--primary-low);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large") {
|
|
|
|
padding-right: 1em;
|
|
|
|
height: 100%;
|
|
|
|
flex: 1 1 auto;
|
|
|
|
&:not(:empty) {
|
|
|
|
border-right: 1px solid var(--primary-low);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
li {
|
|
|
|
display: flex;
|
|
|
|
gap: 0.5em;
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 0.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-extra-large", min-width) {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 1em;
|
|
|
|
}
|
|
|
|
&: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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-icon {
|
|
|
|
font-size: var(--font-down-1);
|
|
|
|
margin-top: 0.2em;
|
|
|
|
}
|
2015-05-05 04:29:45 +08:00
|
|
|
}
|
2018-05-03 08:12:19 +08:00
|
|
|
|
|
|
|
.info-text {
|
2019-02-05 17:47:22 +08:00
|
|
|
margin: 0.25em 0;
|
2018-05-03 08:12:19 +08:00
|
|
|
display: block;
|
|
|
|
}
|
2023-07-06 00:20:18 +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);
|
|
|
|
}
|
|
|
|
}
|
2015-05-05 04:29:45 +08:00
|
|
|
}
|
|
|
|
|
2015-04-24 01:33:29 +08:00
|
|
|
.poll-container {
|
2023-07-06 00:20:18 +08:00
|
|
|
grid-area: poll;
|
|
|
|
padding: 1em;
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
align-self: center;
|
|
|
|
|
|
|
|
li {
|
|
|
|
cursor: pointer;
|
|
|
|
font-size: var(--font-up-1);
|
|
|
|
}
|
2015-05-05 04:29:45 +08:00
|
|
|
|
2016-06-09 21:33:17 +08:00
|
|
|
.poll-results-number-rating {
|
2022-10-12 21:31:59 +08:00
|
|
|
font-size: var(--font-up-5);
|
2015-05-05 04:29:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-06 00:20:18 +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
|
|
|
.poll-buttons {
|
2023-07-06 00:20:18 +08:00
|
|
|
grid-area: buttons;
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
gap: 0.5em;
|
|
|
|
width: 100%;
|
|
|
|
padding: 1em;
|
|
|
|
border-top: 1px solid var(--primary-low);
|
|
|
|
|
|
|
|
button {
|
|
|
|
white-space: nowrap;
|
|
|
|
align-self: start;
|
|
|
|
.d-button-label {
|
|
|
|
@include ellipsis;
|
|
|
|
}
|
|
|
|
|
|
|
|
@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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint("mobile-large") {
|
|
|
|
&:first-child:last-child,
|
|
|
|
&.cast-votes {
|
|
|
|
// ok to expand button width on smaller screens
|
|
|
|
flex: 1 1 100%;
|
|
|
|
}
|
|
|
|
}
|
2018-05-12 08:14:58 +08:00
|
|
|
}
|
2023-07-06 00:20:18 +08:00
|
|
|
|
|
|
|
&:empty {
|
|
|
|
display: none;
|
2019-03-07 09:27:40 +08:00
|
|
|
}
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
|
2019-02-05 17:47:22 +08:00
|
|
|
.poll-voters:not(:empty) {
|
2020-02-27 18:09:54 +08:00
|
|
|
min-height: 30px;
|
2019-02-05 17:47:22 +08:00
|
|
|
margin-bottom: 0.25em;
|
2020-02-27 18:09:54 +08:00
|
|
|
|
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;
|
2020-02-27 18:09:54 +08:00
|
|
|
|
|
|
|
.spinner {
|
|
|
|
margin-top: 0.25em;
|
|
|
|
}
|
2016-06-07 18:55:01 +08:00
|
|
|
}
|
|
|
|
|
2023-07-06 00:20:18 +08:00
|
|
|
.poll-buttons-dropdown {
|
|
|
|
align-self: stretch;
|
|
|
|
|
|
|
|
.label {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.widget-dropdown {
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
&-header {
|
|
|
|
height: 100%;
|
|
|
|
.d-icon {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.poll-buttons-dropdown,
|
|
|
|
.export-results,
|
|
|
|
.toggle-status,
|
|
|
|
.show-breakdown {
|
|
|
|
// we want these controls to be separated
|
|
|
|
// from voting controls
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
|
|
|
|
2015-04-24 01:33:29 +08:00
|
|
|
.results {
|
2018-08-29 21:11:03 +08:00
|
|
|
> li {
|
2018-11-19 21:50:00 +08:00
|
|
|
cursor: default;
|
2019-02-05 17:47:22 +08:00
|
|
|
padding: 0.25em 0;
|
|
|
|
&:last-child {
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
2018-08-28 04:53:35 +08:00
|
|
|
}
|
2015-04-24 01:33:29 +08:00
|
|
|
.option {
|
2015-06-03 22:49:20 +08:00
|
|
|
p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.percentage {
|
2015-06-03 22:49:20 +08:00
|
|
|
float: right;
|
2020-08-04 23:14:33 +08:00
|
|
|
color: var(--primary-medium);
|
2018-08-28 04:53:35 +08:00
|
|
|
margin-left: 0.25em;
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.bar-back {
|
2020-08-04 23:14:33 +08:00
|
|
|
background: var(--primary-low);
|
2015-04-24 01:33:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.bar {
|
2018-08-28 04:53:35 +08:00
|
|
|
height: 0.75em;
|
2020-08-04 23:14:33 +08:00
|
|
|
background: var(--primary-medium);
|
2017-01-25 11:56:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.chosen .bar {
|
2020-08-04 23:14:33 +08:00
|
|
|
background: var(--tertiary);
|
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
|
|
|
|
2020-02-12 00:02:54 +08:00
|
|
|
.pie-chart-legends {
|
2021-08-23 19:49:49 +08:00
|
|
|
justify-content: center;
|
2020-02-12 00:02:54 +08:00
|
|
|
text-align: center;
|
2020-10-27 20:48:54 +08:00
|
|
|
margin-top: 0.5em;
|
2020-02-12 00:02:54 +08:00
|
|
|
|
|
|
|
.legend {
|
2021-08-23 19:49:49 +08:00
|
|
|
align-items: center;
|
|
|
|
cursor: pointer;
|
2022-04-20 15:43:10 +08:00
|
|
|
display: inline-flex;
|
2021-08-23 19:49:49 +08:00
|
|
|
flex-direction: row;
|
|
|
|
margin-left: 1em;
|
|
|
|
font-size: var(--font-down-0);
|
2020-02-12 00:02:54 +08:00
|
|
|
|
|
|
|
.swatch {
|
2021-08-23 19:49:49 +08:00
|
|
|
margin-right: 0.5em;
|
2020-02-12 00:02:54 +08:00
|
|
|
display: inline-block;
|
2021-08-23 19:49:49 +08:00
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
2020-02-12 00:02:54 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-26 01:51:01 +08:00
|
|
|
.poll-grouped-pies-controls {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.poll-results-chart {
|
|
|
|
overflow-y: auto;
|
|
|
|
overflow-x: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-06 00:20:18 +08:00
|
|
|
.d-editor-preview {
|
|
|
|
.poll {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|