/
_chips-theme.scss
44 lines (37 loc) · 1.44 KB
/
_chips-theme.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@import '@material/chips/mixins.import';
@import '../mdc-helpers/mdc-helpers';
@import '@material/theme/functions.import';
@mixin mat-mdc-chips-theme($theme) {
@include mdc-chip-set-core-styles($query: $mat-theme-styles-query);
@include mdc-chip-without-ripple($query: $mat-theme-styles-query);
$primary: mat-color(map-get($theme, primary));
$accent: mat-color(map-get($theme, accent));
$warn: mat-color(map-get($theme, warn));
$background: map-get($theme, background);
$unselected-background: mat-color($background, unselected-chip);
.mat-mdc-chip {
@include mdc-chip-fill-color-accessible($unselected-background,
$query: $mat-theme-styles-query);
&.mat-primary {
&.mdc-chip--selected, &.mat-mdc-chip-highlighted {
@include mdc-chip-fill-color-accessible($primary, $query: $mat-theme-styles-query);
}
}
&.mat-accent {
&.mdc-chip--selected, &.mat-mdc-chip-highlighted {
@include mdc-chip-fill-color-accessible($accent, $query: $mat-theme-styles-query);
}
}
&.mat-warn {
&.mdc-chip--selected, &.mat-mdc-chip-highlighted {
@include mdc-chip-fill-color-accessible($warn, $query: $mat-theme-styles-query);
}
}
}
}
@mixin mat-mdc-chips-typography($config) {
@include mdc-chip-set-core-styles($query: $mat-typography-styles-query);
@include mat-using-mdc-typography($config) {
@include mdc-chip-without-ripple($query: $mat-typography-styles-query);
}
}