material-components-web icon indicating copy to clipboard operation
material-components-web copied to clipboard

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

Open hilljh82 opened this issue 2 years ago • 1 comments

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.

hilljh82 avatar Mar 17 '23 20:03 hilljh82

Do we have a fix for this?

sz-FarmersEdge avatar Aug 08 '23 22:08 sz-FarmersEdge