source: trip-planner-front/node_modules/@angular/material/menu/_menu-theme.scss

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: 2.1 KB
Line 
1@use 'sass:map';
2@use '../core/style/private';
3@use '../core/theming/theming';
4@use '../core/typography/typography';
5@use '../core/typography/typography-utils';
6
7
8@mixin color($config-or-theme) {
9 $config: theming.get-color-config($config-or-theme);
10 $background: map.get($config, background);
11 $foreground: map.get($config, foreground);
12
13 .mat-menu-panel {
14 @include private.private-theme-overridable-elevation(4, $config);
15 background: theming.get-color-from-palette($background, 'card');
16 }
17
18 .mat-menu-item {
19 background: transparent;
20 color: theming.get-color-from-palette($foreground, 'text');
21
22 &[disabled] {
23 &,
24 .mat-menu-submenu-icon,
25 .mat-icon-no-color {
26 color: theming.get-color-from-palette($foreground, 'disabled');
27 }
28 }
29 }
30
31 .mat-menu-item .mat-icon-no-color,
32 .mat-menu-submenu-icon {
33 color: theming.get-color-from-palette($foreground, 'icon');
34 }
35
36 .mat-menu-item:hover,
37 .mat-menu-item.cdk-program-focused,
38 .mat-menu-item.cdk-keyboard-focused,
39 .mat-menu-item-highlighted {
40 &:not([disabled]) {
41 background: theming.get-color-from-palette($background, 'hover');
42 }
43 }
44}
45
46@mixin typography($config-or-theme) {
47 $config: typography.private-typography-to-2014-config(
48 theming.get-typography-config($config-or-theme));
49 .mat-menu-item {
50 font: {
51 family: typography-utils.font-family($config, body-1);
52 size: typography-utils.font-size($config, body-1);
53 weight: typography-utils.font-weight($config, body-1);
54 }
55 }
56}
57
58@mixin _density($config-or-theme) {}
59
60@mixin theme($theme-or-color-config) {
61 $theme: theming.private-legacy-get-theme($theme-or-color-config);
62 @include theming.private-check-duplicate-theme-styles($theme, 'mat-menu') {
63 $color: theming.get-color-config($theme);
64 $density: theming.get-density-config($theme);
65 $typography: theming.get-typography-config($theme);
66
67 @if $color != null {
68 @include color($color);
69 }
70 @if $density != null {
71 @include _density($density);
72 }
73 @if $typography != null {
74 @include typography($typography);
75 }
76 }
77}
78
Note: See TracBrowser for help on using the repository browser.