-
Notifications
You must be signed in to change notification settings - Fork 6.7k
/
_all-density.scss
36 lines (29 loc) · 1.59 KB
/
_all-density.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@use '../../../core/theming/theming';
@use '../../../core/density/private/all-density';
@use '../../../legacy-form-field/form-field-theme';
@use '../../../legacy-button/button-theme';
// Add legacy theme imports here, e.g.:
// @use '../../../<legacy-component>/<legacy-component>-theme';
// Includes all of the density styles.
@mixin all-legacy-component-densities($config-or-theme) {
// In case a theme object has been passed instead of a configuration for
// the density system, extract the density config from the theme object.
$config: if(theming.private-is-theme-object($config-or-theme),
theming.get-density-config($config-or-theme), $config-or-theme);
@if $config == null {
@error 'No density configuration specified.';
}
// TODO: COMP-309: Do not use individual mixins. Instead, use the all-theme mixin and only
// specify a `density` config while setting `color` and `typography` to `null`. This is currently
// not possible as it would introduce a circular dependency for density because the `mat-core`
// mixin that is transitively loaded by the `all-theme` file, imports `all-density` which
// would then load `all-theme` again. This ultimately results a circular dependency.
// Add legacy density includes here, e.g.:
// @include <legacy-component>-theme.density($config);
@include form-field-theme.density($config);
@include all-density.private-all-unmigrated-component-densities($config);
}
// @deprecated Use `all-legacy-component-densities`.
@mixin angular-material-legacy-density($config-or-theme) {
@include all-legacy-component-densities($config-or-theme);
}