forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add check for new theming bundle (angular#22398)
Sets up a build check to verify that the new theming API works.
- Loading branch information
Showing
4 changed files
with
51 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/material/core/theming/tests/test-legacy-theming-bundle.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Imports the theming bundle. Needs to be an absolute bin-dir import path as on Windows, | ||
// runfiles are not symlinked, so the Sass compilation happens in the workspace directory | ||
// with the include paths being set to the `bazel-bin` directory. | ||
// stylelint-disable-next-line material/no-import | ||
@import 'src/material/theming'; | ||
|
||
// Disable theme style duplication warnings. This test intentionally generates | ||
// the same themes multiple times. | ||
$mat-theme-ignore-duplication-warnings: true; | ||
|
||
@include mat-core(); | ||
|
||
$theme: mat-light-theme(( | ||
color: ( | ||
primary: $mat-red, | ||
accent: $mat-blue, | ||
), | ||
density: -2, | ||
)); | ||
|
||
// If one of these mixins is not available, the compilation will fail and the | ||
// test will be reported as failing. | ||
@include angular-material-theme($theme); | ||
@include angular-material-typography(); | ||
@include angular-material-color($theme); | ||
@include angular-material-density($theme); | ||
@include mat-core-theme($theme); | ||
@include mat-button-theme($theme); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
// Imports the theming bundle. Needs to be an absolute bin-dir import path as on Windows, | ||
// runfiles are not symlinked, so the Sass compilation happens in the workspace directory | ||
// with the include paths being set to the `bazel-bin` directory. | ||
// stylelint-disable-next-line material/no-import | ||
@import 'src/material/theming'; | ||
@use 'src/material' as mat; | ||
|
||
// Disable theme style duplication warnings. This test intentionally generates | ||
// the same themes multiple times. | ||
$mat-theme-ignore-duplication-warnings: true; | ||
mat.$theme-ignore-duplication-warnings: true; | ||
|
||
@include mat-core(); | ||
@include mat.core(); | ||
|
||
$theme: mat-light-theme(( | ||
$theme: mat.define-light-theme(( | ||
color: ( | ||
primary: $mat-red, | ||
accent: $mat-blue, | ||
primary: mat.$red-palette, | ||
accent: mat.$blue-palette, | ||
), | ||
density: -2, | ||
)); | ||
|
||
// If one of these mixins is not available, the compilation will fail and the | ||
// test will be reported as failing. | ||
@include angular-material-theme($theme); | ||
@include angular-material-typography(); | ||
@include angular-material-color($theme); | ||
@include angular-material-density($theme); | ||
@include mat-core-theme($theme); | ||
@include mat-button-theme($theme); | ||
@include mat.all-component-themes($theme); | ||
@include mat.all-component-typographies(); | ||
@include mat.all-component-colors($theme); | ||
@include mat.core-theme($theme); | ||
@include mat.button-theme($theme); |