File tree Expand file tree Collapse file tree 5 files changed +43
-6
lines changed Expand file tree Collapse file tree 5 files changed +43
-6
lines changed Original file line number Diff line number Diff line change 42
42
/src /material /core /* @ jelbourn
43
43
/src /material /core /testing /** @ crisbeto
44
44
/src /material /core /animation /** @ jelbourn
45
+ /src /material /core /color /** @ jelbourn @ devversion
45
46
/src /material /core /common-behaviors /** @ jelbourn @ devversion
46
47
/src /material /core /datetime /** @ mmalerba
47
48
/src /material /core /density /** @ devversion
Original file line number Diff line number Diff line change @@ -26,11 +26,12 @@ scss_bundle(
26
26
name = "theming_bundle" ,
27
27
outs = ["_theming.scss" ],
28
28
args = [
29
- "--entryFile=$(execpath //src/material/core :theming/_all-theme .scss)" ,
29
+ "--entryFile=$(execpath :theming-bundle .scss)" ,
30
30
"--outFile=$(execpath :_theming.scss)" ,
31
31
],
32
32
data = CDK_SCSS_LIBS + MATERIAL_SCSS_LIBS + [
33
- "//src/material/core:theming/_all-theme.scss" ,
33
+ "theming-bundle.scss" ,
34
+ "//src/material/core:theming_scss_lib" ,
34
35
# Config file is required by "scss-bundle" and will be automatically
35
36
# loaded by the CLI. It expects the config to be in the execroot.
36
37
"//:scss-bundle.config.json" ,
Original file line number Diff line number Diff line change @@ -41,11 +41,21 @@ ng_module(
41
41
],
42
42
)
43
43
44
+ ALL_THEMING_FILES = [
45
+ # The `_core.scss` file needs to be added here too because it depends
46
+ # on the `_all-typography` file.
47
+ "_core.scss" ,
48
+ "color/_all-color.scss" ,
49
+ "density/_all-density.scss" ,
50
+ "theming/_all-theme.scss" ,
51
+ "typography/_all-typography.scss" ,
52
+ ]
53
+
44
54
sass_library (
45
55
name = "core_scss_lib" ,
46
56
srcs = glob (
47
57
["**/_*.scss" ],
48
- exclude = [ "theming/_all-theme.scss" ] ,
58
+ exclude = ALL_THEMING_FILES ,
49
59
),
50
60
deps = [
51
61
"//src/cdk/a11y:a11y_scss_lib" ,
@@ -56,9 +66,7 @@ sass_library(
56
66
57
67
sass_library (
58
68
name = "theming_scss_lib" ,
59
- srcs = [
60
- "theming/_all-theme.scss" ,
61
- ],
69
+ srcs = ALL_THEMING_FILES ,
62
70
deps = MATERIAL_SCSS_LIBS ,
63
71
)
64
72
Original file line number Diff line number Diff line change
1
+ @import ' ../theming/all-theme' ;
2
+
3
+ // Includes all of the color styles.
4
+ @mixin angular-material-color ($config ) {
5
+ // In case a theme object has been passed instead of a configuration for
6
+ // the color system, extract the color config from the theme object.
7
+ @if type_of ($config ) == ' map' {
8
+ $config : map_get ($config , color );
9
+ }
10
+ // If no actual color configuration has been specified, report an error.
11
+ @if not $config {
12
+ @error ' No color configuration specified.' ;
13
+ }
14
+
15
+ @include angular-material-theme ((
16
+ color : $config ,
17
+ typography: null,
18
+ density: null,
19
+ ));
20
+ }
Original file line number Diff line number Diff line change
1
+ // File for which all imports are resolved and bundled. This is the entry-point for
2
+ // the `@angular/material` theming Sass bundle. See `//src/material:theming_bundle`.
3
+
4
+ @import ' ./core/color/all-color' ;
5
+ @import ' ./core/density/all-density' ;
6
+ @import ' ./core/theming/all-theme' ;
7
+ @import ' ./core/typography/all-typography' ;
You can’t perform that action at this time.
0 commit comments