Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | @use 'sass:map';
|
---|
| 2 | @use 'sass:meta';
|
---|
| 3 | @use '../theming/theming';
|
---|
| 4 |
|
---|
| 5 | @mixin _border-color($color) {
|
---|
| 6 | .mat-focus-indicator::before {
|
---|
| 7 | border-color: $color;
|
---|
| 8 | }
|
---|
| 9 | }
|
---|
| 10 |
|
---|
| 11 | // stylelint-disable-next-line material/theme-mixin-api
|
---|
| 12 | @mixin color($config-or-theme-or-color) {
|
---|
| 13 | @if meta.type-of($config-or-theme-or-color) == 'color' {
|
---|
| 14 | @include _border-color($config-or-theme-or-color);
|
---|
| 15 | }
|
---|
| 16 | @else {
|
---|
| 17 | $config: theming.get-color-config($config-or-theme-or-color);
|
---|
| 18 | $border-color: theming.get-color-from-palette(map.get($config, primary));
|
---|
| 19 | @include _border-color($border-color);
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | // stylelint-disable-next-line material/theme-mixin-api
|
---|
| 24 | @mixin theme($theme-or-color-config-or-color) {
|
---|
| 25 | @if meta.type-of($theme-or-color-config-or-color) == 'color' {
|
---|
| 26 | @include _border-color($theme-or-color-config-or-color);
|
---|
| 27 | }
|
---|
| 28 | @else {
|
---|
| 29 | $theme: theming.private-legacy-get-theme($theme-or-color-config-or-color);
|
---|
| 30 | @include theming.private-check-duplicate-theme-styles($theme, 'mat-focus-indicators') {
|
---|
| 31 | $color: theming.get-color-config($theme);
|
---|
| 32 | @if $color != null {
|
---|
| 33 | @include color($color);
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
| 37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.