Getting SASS error when creating new theme
See original GitHub issueI tried creating a new theme
@import '@angular/material/core/theming/all-theme';
// Include non-theme styles for core.
@include md-core();
// Define a theme.
$primary: md-palette($md-light-blue);
$accent: md-palette($md-teal, A200, A100, A400);
$theme: md-light-theme($primary, $accent);
// Include all theme styles for the components.
@include angular-material-theme($theme);
It is throwing the following error
home.style.css:8Uncaught Error: Module build failed:
undefined
^
Argument `$color` of `opacity($color)` must be a color
Backtrace:
node_modules/@angular/material/core/theming/_theming.scss:55, in function `opacity`
node_modules/@angular/material/core/theming/_theming.scss:55, in function `if`
node_modules/@angular/material/core/theming/_theming.scss:55, in function `md-color`
node_modules/@angular/material/core/theming/_theming.scss:51, in function `md-color`
node_modules/@angular/material/core/ripple/_ripple.scss:68, in mixin `md-ripple-theme`
node_modules/@angular/material/core/_core.scss:26, in mixin `md-core-theme`
node_modules/@angular/material/core/theming/_all-theme.scss:26, in mixin `angular-material-theme`
It is working fine after commenting @include md-core-theme($theme) in _all-theme.scss. But i am not sure it breaks something else.
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (4 by maintainers)
Top Results From Across the Web
Angular 13: Angular Material 13 custom theme throwing error
It seems that material needs at least hue: 100, hue 500 and hue 700 (probably for functions like lighter etc).
Read more >New version 1.2.5 not compiling properly - WordPress.org
The problem seems to be that the plugin doesn't create its necessary “cache” directory. If you create that directory it seems to work...
Read more >Deprecating Sass for Shopify Themes
Get details on why Shopify is deprecating Sass in themes and how you can adjust your workflow and custom themes to adapt to...
Read more >Issues when building theme - Forums - Liferay
Hi,. I am facing issues with my environment, I guess. I am trying to create a new theme, but I am receiving errors...
Read more >Customize Styling | Mendix Documentation
Create a new file theme/web/company-header.scss. In the new file create a class with a selector name ( .company-header ) and include a CSS ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had a similar issue, which occurred because when I apply the color, I forgot to use
mat-color
.I have the same issue