Skip to content

Commit f02af52

Browse files
EladBezaleltinayuangao
authored andcommitted
style(progress): added transition to color change (#3116)
1 parent f27617a commit f02af52

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/lib/progress-bar/progress-bar.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import '../core/style/variables';
2+
13
$mat-progress-bar-height: 5px !default;
24
$mat-progress-bar-full-animation-duration: 2000ms !default;
35
$mat-progress-bar-piece-animation-duration: 250ms !default;
@@ -33,7 +35,8 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
3335
// beyond the current value of the primary progress bar.
3436
.mat-progress-bar-buffer {
3537
transform-origin: top left;
36-
transition: transform $mat-progress-bar-piece-animation-duration ease;
38+
transition: transform $mat-progress-bar-piece-animation-duration ease,
39+
stroke $swift-ease-in-duration $ease-in-out-curve-function;
3740
}
3841

3942
// The secondary progress bar is only used in the indeterminate animation, because of this it
@@ -46,7 +49,8 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
4649
.mat-progress-bar-fill {
4750
animation: none;
4851
transform-origin: top left;
49-
transition: transform $mat-progress-bar-piece-animation-duration ease;
52+
transition: transform $mat-progress-bar-piece-animation-duration ease,
53+
stroke $swift-ease-in-duration $ease-in-out-curve-function;
5054
}
5155

5256
// A pseudo element is created for each progress bar bar that fills with the indicator color.

src/lib/progress-spinner/progress-spinner.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ $mat-progress-spinner-viewport-size: 100px !default;
3535

3636
// Stroke width of 10px defines stroke as 10% of the viewBox.
3737
stroke-width: $mat-progress-spinner-stroke-width;
38+
transition: stroke $swift-ease-in-duration $ease-in-out-curve-function;
3839
}
3940

4041

0 commit comments

Comments
 (0)