]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Progress line height (#21805)
authorMark Otto <markd.otto@gmail.com>
Sat, 21 Jan 2017 20:32:38 +0000 (12:32 -0800)
committerGitHub <noreply@github.com>
Sat, 21 Jan 2017 20:32:38 +0000 (12:32 -0800)
* remove obvi comments

* proper fix for #21801

- ensures .progress-bar text is vertically centered should the height of the .progress-bar change by matching the line-height and height values
- we can't use flexbox here because the inner text of an element doesn't count as a flex item

scss/_progress.scss

index 02e4c3bd2db8b1b95e5b6d71873b57f187ef7c0f..ccca51e8de218b424f45e59433fe6ee3f2d78318 100644 (file)
@@ -1,10 +1,8 @@
-// Progress animations
 @keyframes progress-bar-stripes {
   from { background-position: $progress-height 0; }
   to { background-position: 0 0; }
 }
 
-// Basic progress bar
 .progress {
   display: flex;
   overflow: hidden; // force rounded corners by cropping it
   background-color: $progress-bg;
   @include border-radius($progress-border-radius);
 }
+
 .progress-bar {
   height: $progress-height;
+  line-height: $progress-height;
   color: $progress-bar-color;
   background-color: $progress-bar-bg;
 }
 
-// Striped
 .progress-bar-striped {
   @include gradient-striped();
   background-size: $progress-height $progress-height;
 }
 
-// Animated
 .progress-bar-animated {
   animation: progress-bar-stripes $progress-bar-animation-timing;
 }