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.

188 lines
3.0 KiB
SCSS
Raw Normal View History

div.poll {
2018-08-28 04:53:35 +08:00
margin: 1em 0;
border: 1px solid var(--primary-low);
2015-05-08 17:13:32 +08:00
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;
font-size: var(--font-up-1);
}
li[data-poll-option-id] {
color: var(--primary);
padding: 0.5em 0;
word-break: break-word;
}
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;
}
}
2015-05-05 04:29:45 +08:00
.poll-info {
color: var(--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 {
font-size: var(--font-up-4);
line-height: var(--line-height-medium);
2015-05-05 04:29:45 +08:00
}
.info-text {
margin: 0.25em 0;
display: block;
}
2015-05-05 04:29:45 +08:00
}
.poll-container {
2015-05-05 04:29:45 +08:00
vertical-align: middle;
padding: 0.5em 1em;
2015-05-05 04:29:45 +08:00
2016-06-09 21:33:17 +08:00
.poll-results-number-rating {
font-size: var(--font-up-5);
2015-05-05 04:29:45 +08:00
}
}
.poll-buttons {
.info-text {
margin: 0.25em 0;
color: var(--primary-medium);
}
2019-03-07 09:27:40 +08: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 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;
.spinner {
margin-top: 0.25em;
}
2016-06-07 18:55:01 +08:00
}
.results {
2018-08-29 21:11:03 +08:00
> li {
cursor: default;
padding: 0.25em 0;
&:last-child {
padding-bottom: 0;
}
2018-08-28 04:53:35 +08:00
}
.option {
p {
margin: 0;
}
}
.percentage {
float: right;
color: var(--primary-medium);
2018-08-28 04:53:35 +08:00
margin-left: 0.25em;
}
.bar-back {
background: var(--primary-low);
}
.bar {
2018-08-28 04:53:35 +08:00
height: 0.75em;
background: var(--primary-medium);
2017-01-25 11:56:39 +08:00
}
.chosen .bar {
background: var(--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;
}
}
.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;
}
}
}
.poll-grouped-pies-controls {
display: flex;
justify-content: space-between;
}
.poll-results-chart {
overflow-y: auto;
overflow-x: hidden;
}
.poll-show-breakdown {
margin-bottom: 0.25em;
}
}
div.poll.pie {
.poll-container {
display: inline-block;
}
.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;
}
}
}