fix: Correct the styling on percent bar on polls

ila
Aonrud 2023-01-06 18:34:26 +00:00
rodzic 2451dbf995
commit 54ba83a95b
2 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -408,3 +408,17 @@ ul.poll-items {
font-variant: small-caps;
color: $muted-text;
}
/*******
* This is awful, but Twig blocks the style attribute needed by the Bootstrap progress bar.
* Also requires Dart SASS, so won't work on sassc
*/
@for $i from 1 through 100 {
$val: $i + '%';
.pc-#{$i} {
width: #{$i} + '%';
}
}

Wyświetl plik

@ -696,7 +696,7 @@
<span class="text-muted">{{ pct }}% <span class="muted">({{ item.replies.totalItems }} votes)</span></span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="{{ pct }}" aria-valuemin="0" aria-valuemax="100" style="{{ 'width: ' ~ pct ~ '%' }}">
<div class="progress-bar {{ 'pc-' ~ pct }}" role="progressbar" aria-valuenow="{{ pct }}" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">{{ pct }}%</span>
</div>
</div>