|
6 | 6 |
|
7 | 7 | // Mixin that renders all of the core styles that are not theme-dependent.
|
8 | 8 | @mixin core() {
|
| 9 | + @include cdk.a11y-visually-hidden(); |
| 10 | + @include private.structural-styling(); |
| 11 | +} |
| 12 | + |
| 13 | +// Emits the mat-app-background CSS class. This predefined class sets the |
| 14 | +// background color and text color of an element. |
| 15 | +@mixin app-background() { |
9 | 16 | // TODO: Move ripple styles to be dynamically loaded instead of in core.
|
10 | 17 | // This variable is used as a fallback for the ripple element's
|
11 | 18 | // background color. However, if it isn't defined anywhere, then MSS
|
|
14 | 21 | --mat-app-on-surface: initial;
|
15 | 22 | }
|
16 | 23 |
|
17 |
| - @include cdk.a11y-visually-hidden(); |
18 |
| - @include private.structural-styling(); |
19 |
| - |
20 | 24 | // Wrapper element that provides the theme background when the
|
21 | 25 | // user's content isn't inside of a `mat-sidenav-container`.
|
22 | 26 | @at-root {
|
|
26 | 30 | @include token-utils.create-token-slot(background-color, background-color, transparent);
|
27 | 31 | @include token-utils.create-token-slot(color, text-color, inherit);
|
28 | 32 | }
|
| 33 | + } |
| 34 | + } |
| 35 | +} |
29 | 36 |
|
| 37 | +// Emits CSS classes for applying elevation. These classes follow the pattern |
| 38 | +// mat-elevation-z#, where # is the elevation number you want, from 0 to 24. |
| 39 | +// These predefined classes use the CSS box-shadow settings defined by the |
| 40 | +// Material Design specification. |
| 41 | +@mixin elevation-classes() { |
| 42 | + @at-root { |
| 43 | + @include token-utils.use-tokens(tokens-mat-app.$prefix, tokens-mat-app.get-token-slots()) { |
30 | 44 | // Provides external CSS classes for each elevation value. Each CSS class is formatted as
|
31 | 45 | // `mat-elevation-z$z-value` where `$z-value` corresponds to the z-space to which the element
|
32 | 46 | // is elevated.
|
|
42 | 56 | }
|
43 | 57 | }
|
44 | 58 | }
|
45 |
| - |
46 |
| -// Mixin that provides the .mat-app-background class. |
47 |
| -@mixin app-background() {} |
48 |
| - |
49 |
| -// Mixin that provides the .mat-elevation-* classes. |
50 |
| -@mixin elevation-classes() {} |
|
0 commit comments