material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.14k stars 2.15k forks source link

_constants.scss is missing from mdc-theme.import.scss #8053

Open hilljh82 opened 1 year ago

hilljh82 commented 1 year ago

Bug report

In ember-cli-mdc, we import the style to generate the default styles of the ember application. We use the following import statement in the ember-cli-mdc-theme addon:

@use "app-theme";
@use "@material/theme/mdc-theme";

This ensure all add-ons and the application have the default application styles set by the developer. This used to work under 6.0.0. We are upgrading to 14.0.0, and the are getting the following error:

Can't find stylesheet to import.
  ╷
3 │ @forward "constants" as mdc-theme-*;
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  node_modules/@material/theme/mdc-theme.import.scss 3:1  
@import addon/styles/addon.scss 2:9                             root stylesheet

This is happening because _constants.scss is no longer present in the repo. If either add that file, or remove the line in question from mdc-theme.import.scss, then stylesheet will compile.

Steps to reproduce

Include the scss file as follows:

@use "@material/theme/mdc-theme";

Actual behavior

Give the error outlined above.

Expected behavior

The scss file should compile.

Screenshots

N/A

Your Environment:

Software Version(s)
MDC Web 14.0.0
Browser All
Operating System MacOS X

Additional context

This is preventing us from updating ember-cli-mdc.

Possible solution

Remove the line in question from mdc-theme.import.scss.

sz-FarmersEdge commented 1 year ago

Do we have a fix for this?