mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-15 10:05:40 +02:00
Progress line height (#21805)
* 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
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
// Progress animations
|
|
||||||
@keyframes progress-bar-stripes {
|
@keyframes progress-bar-stripes {
|
||||||
from { background-position: $progress-height 0; }
|
from { background-position: $progress-height 0; }
|
||||||
to { background-position: 0 0; }
|
to { background-position: 0 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Basic progress bar
|
|
||||||
.progress {
|
.progress {
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden; // force rounded corners by cropping it
|
overflow: hidden; // force rounded corners by cropping it
|
||||||
@@ -14,19 +12,19 @@
|
|||||||
background-color: $progress-bg;
|
background-color: $progress-bg;
|
||||||
@include border-radius($progress-border-radius);
|
@include border-radius($progress-border-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
height: $progress-height;
|
height: $progress-height;
|
||||||
|
line-height: $progress-height;
|
||||||
color: $progress-bar-color;
|
color: $progress-bar-color;
|
||||||
background-color: $progress-bar-bg;
|
background-color: $progress-bar-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Striped
|
|
||||||
.progress-bar-striped {
|
.progress-bar-striped {
|
||||||
@include gradient-striped();
|
@include gradient-striped();
|
||||||
background-size: $progress-height $progress-height;
|
background-size: $progress-height $progress-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Animated
|
|
||||||
.progress-bar-animated {
|
.progress-bar-animated {
|
||||||
animation: progress-bar-stripes $progress-bar-animation-timing;
|
animation: progress-bar-stripes $progress-bar-animation-timing;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user