Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bug(theming): Stackblitz docs examples + Firefox hang indefinitely #31823

Open
Labels
needs triageThis issue needs to be triaged by the team
@michael-small

Description

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

17

Description

I'm not sure if this is technically a Material regression, as this may be more of a Stackblitz thing. But I am not sure where to file that, and this seems like this should be on the radar for the Material docs users using Firefox.

I was trying to run Material doc examples in Firefox. After messing around, I was able to fix it by commenting out some of the root SCSS. In particular, something about the @use '@angular/material' as mat will cause Firefox ran Stackblitz projects to hang on the "ng serve --> Building..." phase in the terminal and "Installing dependencies" step of the container loader.

Below is what has to be done to any Material styled file to get them to work, nullifying theming.

// @use '@angular/material' as mat;
body {
 font-family: Roboto, 'Helvetica Neue', sans-serif;
 margin: 0;
 padding: 30px;
 height: 100%;
 // @include mat.theme((
 // color: (
 // theme-type: light,
 // primary: mat.$azure-palette,
 // tertiary: mat.$blue-palette,
 // ),
 // typography: Roboto,
 // density: 0,
 // ));
}
html {
 height: 100%;
}

Same applies to other theming file locations, like in-component styles which are just

 styles: `
 @use '@angular/material' as mat;
 `,

Reproduction

StackBlitz link:

Additionally, here are links from the v18 and v19 docs that can pop open a pre-existing Stackblitz with the same issue

Steps to reproduce:

  1. Open Firefox
  2. Open both links
  3. Observe that "20.1 without styling" loads
  4. Observe that "20.1 with styling" hangs
  5. Note the difference between both's root styles.scss

Expected Behavior

App serves and loads

Actual Behavior

App hangs on "ng serve --> Building..." in the terminal and the "Installing dependencies" step of the container loader.

Environment

This applies to any previous version using the new theming API, so v18 and v19 as well as v20. And I observed this as late as the latest prerelease today.

  • Angular: 20.1.0
  • CDK/Material: 20.1.0
  • Browser(s): Firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11, Ubuntu 24 (VM), and macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /