Improve progress bar rendering

This commit is contained in:
Oliver Walters 2020-04-23 09:20:18 +10:00
parent a803f21e0c
commit 1a0f091e0c
2 changed files with 9 additions and 2 deletions

View File

@ -40,12 +40,17 @@
.progress-bar {
opacity: 60%;
background: #2aa02a;
}
.progress-bar-exceed {
.progress-bar-under {
background: #eeaa33;
}
.progress-bar-over {
background: #337ab7;
}
.progress-value {
width: 100%;
color: #333;

View File

@ -116,7 +116,9 @@ function makeProgressBar(value, maximum, opts) {
var extraclass = '';
if (value > maximum) {
extraclass='progress-bar-exceed';
extraclass='progress-bar-over';
} else if (value < maximum) {
extraclass = 'progress-bar-under';
}
var id = opts.id || 'progress-bar';