diff --git a/less/mixins.less b/less/mixins.less index 3e1c717f14..6d39d2aaeb 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -427,6 +427,15 @@ margin-bottom: ((@navbar-height - @element-height) / 2); } +// Progress bars +// ------------------------- +.progress-bar-variant(@color) { + background-color: @color; + .progress-striped & { + #gradient > .striped(@color); + } +} + // Responsive utilities // ------------------------- // More easily include all the states for responsive-utilities.less. diff --git a/less/progress-bars.less b/less/progress-bars.less index e963fa9681..59f81048f0 100644 --- a/less/progress-bars.less +++ b/less/progress-bars.less @@ -87,32 +87,20 @@ // Danger (red) .progress-bar-danger { - background-color: @progress-bar-danger-bg; - .progress-striped & { - #gradient > .striped(@progress-bar-danger-bg); - } + .progress-bar-variant(@progress-bar-danger-bg); } // Success (green) .progress-bar-success { - background-color: @progress-bar-success-bg; - .progress-striped & { - #gradient > .striped(@progress-bar-success-bg); - } + .progress-bar-variant(@progress-bar-success-bg); } // Warning (orange) .progress-bar-warning { - background-color: @progress-bar-warning-bg; - .progress-striped & { - #gradient > .striped(@progress-bar-warning-bg); - } + .progress-bar-variant(@progress-bar-warning-bg); } // Info (teal) .progress-bar-info { - background-color: @progress-bar-info-bg; - .progress-striped & { - #gradient > .striped(@progress-bar-info-bg); - } + .progress-bar-variant(@progress-bar-info-bg); }