|
1 |
| -@import '~@angular/material/theming'; |
| 1 | +@use '~@angular/material' as mat; |
2 | 2 |
|
3 |
| -@import './app/pages/component-category-list/component-category-list-theme'; |
4 |
| -@import './app/pages/component-sidenav/component-sidenav-theme'; |
5 |
| -@import './app/pages/component-viewer/component-viewer-theme'; |
6 |
| -@import './app/pages/guide-list/guide-list-theme'; |
7 |
| -@import './app/pages/homepage/homepage-theme'; |
8 |
| -@import './app/pages/not-found/not-found-theme'; |
9 |
| -@import './app/shared/carousel/carousel-theme'; |
10 |
| -@import './app/shared/example-viewer/example-viewer-theme'; |
11 |
| -@import './app/shared/footer/footer-theme'; |
12 |
| -@import './app/shared/navbar/navbar-theme'; |
13 |
| -@import './app/shared/table-of-contents/table-of-contents-theme'; |
14 |
| -@import './styles/api-theme'; |
15 |
| -@import './styles/markdown-theme'; |
16 |
| -@import './styles/svg-theme'; |
17 |
| -@import './styles/tables-theme'; |
| 3 | +@use 'sass:map'; |
| 4 | +@use './app/pages/component-category-list/component-category-list-theme'; |
| 5 | +@use './app/pages/component-sidenav/component-sidenav-theme'; |
| 6 | +@use './app/pages/component-viewer/component-viewer-theme'; |
| 7 | +@use './app/pages/guide-list/guide-list-theme'; |
| 8 | +@use './app/pages/homepage/homepage-theme'; |
| 9 | +@use './app/pages/not-found/not-found-theme'; |
| 10 | +@use './app/shared/carousel/carousel-theme'; |
| 11 | +@use './app/shared/example-viewer/example-viewer-theme'; |
| 12 | +@use './app/shared/footer/footer-theme'; |
| 13 | +@use './app/shared/navbar/navbar-theme'; |
| 14 | +@use './app/shared/table-of-contents/table-of-contents-theme'; |
| 15 | +@use './styles/api-theme'; |
| 16 | +@use './styles/markdown-theme'; |
| 17 | +@use './styles/svg-theme'; |
| 18 | +@use './styles/tables-theme'; |
18 | 19 |
|
19 | 20 | // Styles for the docs app that are based on the current theme.
|
20 |
| -@mixin material-docs-app-theme($theme) { |
21 |
| - $primary: map-get($theme, primary); |
22 |
| - $accent: map-get($theme, accent); |
23 |
| - $warn: map-get($theme, warn); |
24 |
| - $background: map-get($theme, background); |
25 |
| - $foreground: map-get($theme, foreground); |
26 |
| - $next-theme: mat-palette($mat-red); |
| 21 | +@mixin theme($theme) { |
| 22 | + $primary: map.get($theme, primary); |
| 23 | + $accent: map.get($theme, accent); |
| 24 | + $warn: map.get($theme, warn); |
| 25 | + $background: map.get($theme, background); |
| 26 | + $foreground: map.get($theme, foreground); |
| 27 | + $next-theme: mat.define-palette(mat.$red-palette); |
27 | 28 |
|
28 | 29 | .docs-app-background {
|
29 |
| - background: mat-color($background, background); |
| 30 | + background: mat.get-color-from-palette($background, background); |
30 | 31 | }
|
31 | 32 |
|
32 | 33 | .docs-primary-header {
|
33 |
| - background: mat-color($primary); |
| 34 | + background: mat.get-color-from-palette($primary); |
34 | 35 |
|
35 | 36 | h1 {
|
36 |
| - color: mat-color($primary, default-contrast); |
| 37 | + color: mat.get-color-from-palette($primary, default-contrast); |
37 | 38 | }
|
38 | 39 | }
|
39 | 40 |
|
40 | 41 | .docs-footer {
|
41 |
| - background: mat-color($primary); |
42 |
| - color: mat-color($primary, default-contrast); |
| 42 | + background: mat.get-color-from-palette($primary); |
| 43 | + color: mat.get-color-from-palette($primary, default-contrast); |
43 | 44 | }
|
44 | 45 |
|
45 | 46 | .is-next-version {
|
46 |
| - background: mat-color($next-theme, 900) !important; |
| 47 | + background: mat.get-color-from-palette($next-theme, 900) !important; |
47 | 48 | }
|
48 |
| - @include carousel-theme($theme); |
49 |
| - @include component-category-list-theme($theme); |
50 |
| - @include component-viewer-sidenav-theme($theme); |
51 |
| - @include component-viewer-theme($theme); |
52 |
| - @include docs-site-api-theme($theme); |
53 |
| - @include docs-site-markdown-theme($theme); |
54 |
| - @include docs-site-svg-theme($theme); |
55 |
| - @include docs-site-tables-theme($theme); |
56 |
| - @include example-viewer-theme($theme); |
57 |
| - @include footer-theme($theme); |
58 |
| - @include guide-list-theme($theme); |
59 |
| - @include home-page-theme($theme); |
60 |
| - @include not-found-theme($theme); |
61 |
| - @include nav-bar-theme($theme); |
62 |
| - @include table-of-contents-theme($theme); |
63 |
| -} |
64 |
| - |
65 |
| -// Define the light theme. |
66 |
| -$primary: mat-palette($mat-indigo); |
67 |
| -$accent: mat-palette($mat-pink, A200, A100, A400); |
68 | 49 |
|
69 |
| -$theme: mat-light-theme($primary, $accent); |
| 50 | + @include carousel-theme.theme($theme); |
| 51 | + @include component-category-list-theme.theme($theme); |
| 52 | + @include component-sidenav-theme.theme($theme); |
| 53 | + @include component-viewer-theme.theme($theme); |
| 54 | + @include api-theme.theme($theme); |
| 55 | + @include markdown-theme.theme($theme); |
| 56 | + @include svg-theme.theme($theme); |
| 57 | + @include tables-theme.theme($theme); |
| 58 | + @include example-viewer-theme.theme($theme); |
| 59 | + @include footer-theme.theme($theme); |
| 60 | + @include guide-list-theme.theme($theme); |
| 61 | + @include homepage-theme.theme($theme); |
| 62 | + @include not-found-theme.theme($theme); |
| 63 | + @include navbar-theme.theme($theme); |
| 64 | + @include table-of-contents-theme.theme($theme); |
| 65 | +} |
0 commit comments