Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(@angular/material-experimental): Undefined variable $m3-spring-green-palette #28924

Closed
1 task
mkurcius opened this issue Apr 21, 2024 · 0 comments · Fixed by #28975
Closed
1 task

bug(@angular/material-experimental): Undefined variable $m3-spring-green-palette #28924

mkurcius opened this issue Apr 21, 2024 · 0 comments · Fixed by #28975
Labels
area: material/core area: theming P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@mkurcius
Copy link

mkurcius commented Apr 21, 2024

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

$m3-spring-green-palette is not exported from @angular/material-experimental/_index.scss
bc of it it variable is used, during build error "Undefined variable." is thrown

Current _index.scss contains only

@forward './theming/m3-palettes' as m3-* show $m3-red-palette, $m3-green-palette, $m3-blue-palette,
  $m3-yellow-palette, $m3-cyan-palette, $m3-magenta-palette, $m3-orange-palette,
  $m3-chartreuse-palette, $m3-azure-palette, $m3-violet-palette, $m3-rose-palette;

Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-ngybdw?file=src%2Fglobal_styles.scss
Steps to reproduce:

  1. add @use "@angular/material-experimental" as matx
  2. try to access matx.$m3-spring-green-palette

Expected Behavior

$m3-spring-green-palette should be exported and no errors during build

Actual Behavior

✘ [ERROR] Undefined variable. error

Environment

Angular CLI: 17.3.5
Node: 20.9.0
Package Manager: npm 10.5.0
OS: win32 x64

Angular: 17.3.5
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-experimental, platform-browser
... platform-browser-dynamic, router, service-worker

Package Version

@angular-devkit/architect 0.1703.5
@angular-devkit/build-angular 17.3.5
@angular-devkit/core 17.3.5
@angular-devkit/schematics 17.3.5
@angular/fire 17.0.1
@schematics/angular 17.3.5
ng-packagr 17.3.0
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.4

@mkurcius mkurcius added the needs triage This issue needs to be triaged by the team label Apr 21, 2024
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: material/core area: theming and removed needs triage This issue needs to be triaged by the team labels Apr 22, 2024
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 26, 2024
Fixes that the `$spring-green-palette` wasn't being exported.

Fixes angular#28924.
crisbeto added a commit that referenced this issue Apr 29, 2024
Fixes that the `$spring-green-palette` wasn't being exported.

Fixes #28924.
crisbeto added a commit that referenced this issue Apr 29, 2024
Fixes that the `$spring-green-palette` wasn't being exported.

Fixes #28924.

(cherry picked from commit 990905d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/core area: theming P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants