covalent: Theme not working

This repository’s issues are reserved for feature requests and bug reports.

Do you want to request a feature or report a bug?

bug

Bug Report

After upgrading to beta 4 theme.scss give following error.

./~/css-loader?{“sourceMap”:false,“importLoaders”:1}!./~/postcss-loader!./~/sass-loader!./src/theme.scss Module build failed: $opacity: if(opacity($color) < 1, opacity($color), $opacity); ^ Argument $color of opacity($color) must be a color

Backtrace: node_modules/@covalent/core/common/styles/_theme-functions.scss:58, in function opacity node_modules/@covalent/core/common/styles/_theme-functions.scss:58, in function if node_modules/@covalent/core/common/styles/_theme-functions.scss:58, in function mat-color node_modules/@angular/material/_theming.scss:2540, in mixin mat-slider-theme node_modules/@angular/material/_theming.scss:2757, in mixin angular-material-theme stdin:21 in /home/randika/Documents/projects/java/sts/extend/extend-spring-boot-sample/apps/web/angular/node_modules/@covalent/core/common/styles/_theme-functions.scss (line 58, column 16) @ ./src/theme.scss 4:14-194 @ multi ./src/styles.css ./~/@covalent/core/common/platform.scss ./src/theme.scss

What is the expected behavior?

Themes to work as normal

Which version of Angular and Material, and which browser and OS does this issue affect?

“angular/core” : “^4.0.0”, “angular/animations” : “^4.1.3”,
“angular/material” : “^2.0.0-beta.6”,

Chome : Version 56.0.2924.87 (64-bit) Linux Ubuntu 16.04

Did this work in previous versions of Angular / Material?

Yes with Beta.3

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (10 by maintainers)

Most upvoted comments

With version ^1.0.0-beta.5-1, the problem is gone

We are currently waiting on angular@4.2.0 to release, since once its released its gonna break 2 of our directives internally (since we were using private animation API’s), so we want to save people from that hassle and fix it before we release so both things go out at the same time.

Once 4.2.0 is released, and we can merge https://github.com/Teradata/covalent/pull/608 which is already good to go, we will release asap after that.

Hey @emoralesb05, Thanks for the fix on the nightly any timeline on when this will be pushed to the main repo??

nvm, did manage to replicate it.

Turns out if you use relative paths instead of ~@covalent/core and ~@angular/material it loads the theming in a diff order.

@emoralesb05 thanks. Looking forward for a fix.