UX: reduces white-space in polls (#6956)

* reduces white-space in polls and uses font-size variables
This commit is contained in:
Joe 2019-02-05 17:47:22 +08:00 committed by Régis Hanol
parent b6e3ef4a90
commit a342d2f150
3 changed files with 21 additions and 24 deletions

View File

@ -16,20 +16,17 @@ div.poll {
li {
cursor: pointer;
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;
padding: 0.5em 0;
}
img {
max-width: 100% !important; /* needed to override internal styles */
// needed to override internal styles in image-sizing hack
max-width: 100% !important;
height: auto;
margin-top: 0.25em;
}
.poll-info {
@ -38,34 +35,34 @@ div.poll {
padding: 1em 0;
.info-label {
font-size: 1.7em;
font-size: $font-up-4;
line-height: $line-height-medium;
}
.info-text {
margin: 5px 0;
margin: 0.25em 0;
display: block;
}
}
.poll-container {
vertical-align: middle;
padding: 0.8em;
padding: 0.5em 1em;
.poll-results-number-rating {
font-size: 2em;
font-size: $font-up-5;
}
}
.poll-buttons {
.info-text {
margin: 0 5px;
margin: 0.25em 0;
color: $primary-medium;
}
}
.poll-voters-list {
margin-top: 0.25em;
.poll-voters:not(:empty) {
margin-bottom: 0.25em;
li {
display: inline;
}
@ -79,17 +76,18 @@ div.poll {
.results {
> li {
cursor: default;
padding: 0.5em 0.7em 0.7em 0.5em;
padding: 0.25em 0;
&:last-child {
padding-bottom: 0;
}
}
.option {
padding-bottom: 0.25em;
p {
margin: 0;
}
}
.percentage {
font-size: $font-up-1;
float: right;
color: $primary-medium;
margin-left: 0.25em;

View File

@ -15,7 +15,7 @@ div.poll {
}
p {
margin: 1.5em;
margin: 0.5em 0;
}
.info-label {
@ -30,7 +30,7 @@ div.poll {
.poll-buttons {
border-top: 1px solid $primary-low;
padding: 1em 1.25em;
padding: 1em;
.info-text {
line-height: 2em;

View File

@ -1,20 +1,19 @@
div.poll {
.poll-buttons {
padding: 0.5em 1.25em 1em 1.25em;
padding: 0.5em 1em 1em 1em;
button {
margin: 0.25em;
margin-right: 0.5em;
}
}
.poll-info {
padding: 0.5em 1.25em 0 1.25em;
padding: 0 1em;
display: flex;
flex-wrap: wrap;
border-top: 1px solid $primary-low;
.info-text {
display: inline;
margin: 0 0.5em 0.25em 0;
}
.info-number {
font-size: $font-up-6;
@ -23,8 +22,8 @@ div.poll {
margin: 0;
width: 100%;
}
.info-label:before {
content: "\00a0"; //nbsp
.info-label {
margin-left: 0.25em;
}
}
}