[6a3a178] | 1 | @use 'sass:map';
|
---|
| 2 | @use '../core/style/private';
|
---|
| 3 | @use '../core/theming/theming';
|
---|
| 4 |
|
---|
| 5 | @mixin color($config-or-theme) {
|
---|
| 6 | $config: theming.get-color-config($config-or-theme);
|
---|
| 7 | $foreground: map.get($config, foreground);
|
---|
| 8 | $background: map.get($config, background);
|
---|
| 9 |
|
---|
| 10 | .mat-autocomplete-panel {
|
---|
| 11 | @include private.private-theme-overridable-elevation(4, $config);
|
---|
| 12 | background: theming.get-color-from-palette($background, card);
|
---|
| 13 | color: theming.get-color-from-palette($foreground, text);
|
---|
| 14 |
|
---|
| 15 | // Selected options in autocompletes should not be gray, but we
|
---|
| 16 | // only want to override the background for selected options if
|
---|
| 17 | // they are *not* in hover or focus state. This change has to be
|
---|
| 18 | // made here because base option styles are shared between the
|
---|
| 19 | // autocomplete and the select.
|
---|
| 20 | .mat-option.mat-selected:not(.mat-active):not(:hover) {
|
---|
| 21 | background: theming.get-color-from-palette($background, card);
|
---|
| 22 |
|
---|
| 23 | &:not(.mat-option-disabled) {
|
---|
| 24 | color: theming.get-color-from-palette($foreground, text);
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | @mixin typography($config-or-theme) {}
|
---|
| 31 |
|
---|
| 32 | @mixin _density($config-or-theme) {}
|
---|
| 33 |
|
---|
| 34 | @mixin theme($theme-or-color-config) {
|
---|
| 35 | $theme: theming.private-legacy-get-theme($theme-or-color-config);
|
---|
| 36 | @include theming.private-check-duplicate-theme-styles($theme, 'mat-autocomplete') {
|
---|
| 37 | $color: theming.get-color-config($theme);
|
---|
| 38 | $density: theming.get-density-config($theme);
|
---|
| 39 | $typography: theming.get-typography-config($theme);
|
---|
| 40 |
|
---|
| 41 | @if $color != null {
|
---|
| 42 | @include color($color);
|
---|
| 43 | }
|
---|
| 44 | @if $density != null {
|
---|
| 45 | @include _density($density);
|
---|
| 46 | }
|
---|
| 47 | @if $typography != null {
|
---|
| 48 | @include typography($typography);
|
---|
| 49 | }
|
---|
| 50 | }
|
---|
| 51 | }
|
---|