1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | @use '@material/theme/keys';
|
22 | @use '@material/theme/theme';
|
23 | @use '@material/theme/theme-color';
|
24 | @use '@material/tokens/resolvers';
|
25 | @use './fab-theme';
|
26 | @use 'sass:map';
|
27 |
|
28 | $height: 56px !default;
|
29 | $mini-height: 40px !default;
|
30 | $shape-radius: 50% !default;
|
31 | $ripple-target: '.mdc-fab__ripple';
|
32 |
|
33 | $_light-theme: (
|
34 | container-color: secondary,
|
35 | container-elevation: 6,
|
36 | container-height: 40px,
|
37 | container-shadow-color: black,
|
38 | container-shape: $shape-radius,
|
39 | container-width: 40px,
|
40 | focus-container-elevation: null,
|
41 | focus-icon-color: null,
|
42 | focus-outline-color: null,
|
43 | focus-outline-width: null,
|
44 | focus-state-layer-color: theme-color.$primary,
|
45 | focus-state-layer-opacity: null,
|
46 | hover-container-elevation: null,
|
47 | hover-icon-color: null,
|
48 | hover-state-layer-color: theme-color.$primary,
|
49 | hover-state-layer-opacity: null,
|
50 | icon-color: on-secondary,
|
51 | icon-size: 24px,
|
52 | lowered-container-elevation: null,
|
53 | lowered-focus-container-elevation: null,
|
54 | lowered-hover-container-elevation: null,
|
55 | lowered-pressed-container-elevation: null,
|
56 | pressed-container-elevation: null,
|
57 | pressed-icon-color: null,
|
58 | pressed-ripple-color: null,
|
59 | pressed-ripple-opacity: null,
|
60 | pressed-state-layer-color: theme-color.$primary,
|
61 | pressed-state-layer-opacity: null,
|
62 | );
|
63 |
|
64 | $custom-property-prefix: 'fab-small';
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 | @mixin theme($theme, $resolvers: resolvers.$material) {
|
73 | @include theme.validate-theme($_light-theme, $theme);
|
74 | $resolved-theme: fab-theme.resolve-theme($theme, $resolvers);
|
75 | @include keys.declare-custom-properties(
|
76 | $resolved-theme,
|
77 | $prefix: $custom-property-prefix
|
78 | );
|
79 | }
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 | @mixin theme-styles($theme, $resolvers: resolvers.$material) {
|
90 | @include theme.validate-theme($_light-theme, $theme);
|
91 |
|
92 | $theme: keys.create-theme-properties(
|
93 | $theme,
|
94 | $prefix: $custom-property-prefix
|
95 | );
|
96 | @include fab-theme.base-theme-styles($theme, $resolvers: $resolvers);
|
97 |
|
98 | $shape-radius: map.get($theme, container-shape);
|
99 | @if $shape-radius {
|
100 | @include fab-theme.shape-radius($shape-radius);
|
101 | }
|
102 | }
|