File tree Expand file tree Collapse file tree 2 files changed +3
-24
lines changed
src/material/progress-bar Expand file tree Collapse file tree 2 files changed +3
-24
lines changed Original file line number Diff line number Diff line change 18
18
}
19
19
20
20
@mixin _palette-styles ($theme , $palette-name ) {
21
- $color-tokens : tokens-mdc-linear-progress .get-color-tokens ($theme , $palette-name );
22
-
23
- // We can't set the `track-color` using `theme`, because it isn't possible for it to use a CSS
24
- // variable since MDC's buffer animation works by constructing an SVG string from this color.
25
- // We also can't set the `track-color` by creating our own token slot because the track-color
26
- // is set in the SVG string in `theme-styles`.
27
- @include mdc-linear-progress-theme .theme-styles ((
28
- // TODO(crisbeto): the buffer color should come from somewhere in MDC, however at the time of
29
- // writing, their buffer color is hardcoded to #e6e6e6 which both doesn't account for theming
30
- // and doesn't match the Material design spec. For now we approximate the buffer background by
31
- // applying an opacity to the color of the bar.
32
- track- color: map .get ($color-tokens , track-color ),
33
- ));
34
-
35
- @include mdc-linear-progress-theme .theme ($color-tokens );
21
+ @include mdc-linear-progress-theme .theme (
22
+ tokens-mdc-linear-progress .get-color-tokens ($theme , $palette-name ));
36
23
}
37
24
38
25
@mixin color ($theme ) {
Original file line number Diff line number Diff line change 1
- @use ' sass:map' ;
2
1
@use ' @material/theme/custom-properties' as mdc-custom-properties ;
3
2
@use ' @material/linear-progress/linear-progress' as mdc-linear-progress ;
4
3
@use ' @material/linear-progress/linear-progress-theme' as mdc-linear-progress-theme ;
5
4
@use ' ../core/tokens/m2/mdc/linear-progress' as m2-mdc-linear-progress ;
6
5
7
6
@include mdc-custom-properties .configure ($emit-fallback-values : false, $emit-fallback-vars : false) {
8
- $mdc-progress-bar-token-slots : m2-mdc-linear-progress .get-token-slots ();
9
-
10
7
// Add the MDC progress-bar static styles.
11
8
@include mdc-linear-progress .static-styles ();
12
9
13
10
// Add the official slots for the MDC progress-bar.
14
- @include mdc-linear-progress-theme .theme-styles (
15
- map .merge ($mdc-progress-bar-token-slots , (
16
- // Excluded because it is meant to be set by theme (b/273562256).
17
- track- color: null,
18
- ))
19
- );
11
+ @include mdc-linear-progress-theme .theme-styles (m2-mdc-linear-progress .get-token-slots ());
20
12
}
21
13
22
14
.mat-mdc-progress-bar {
You can’t perform that action at this time.
0 commit comments