components icon indicating copy to clipboard operation
components copied to clipboard

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

Open mkurcius opened this issue 2 months ago • 0 comments

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 avatar Apr 21 '24 22:04 mkurcius