Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme does not work with igx-css-vars in version 8 #5152

Closed
lalo-mx opened this issue Jun 21, 2019 · 5 comments · Fixed by #5144
Closed

Theme does not work with igx-css-vars in version 8 #5152

lalo-mx opened this issue Jun 21, 2019 · 5 comments · Fixed by #5144
Assignees
Labels
🐛 bug Any issue that describes a bug material-theme version: 8.0.0 ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@lalo-mx
Copy link

lalo-mx commented Jun 21, 2019

Description

Theme does not work with igx-css-vars in version 8

  • igniteui-angular version: 8.0.0
  • browser: NA

Steps to reproduce

  1. Download sample sample-igniteui-angular-8.zip
  2. Run npm install
  3. Run npm run build

Result

The build shows an error {value} isn't a valid CSS value.


Module build failed (from ./node_modules/sass-loader/lib/loader.js):

undefined
                                   ^
      (50: #52a6ff, 100: #3f96f4, 200: #1475dc, 300: #0c5db3, 400: #0550a0, 500: 
#004691, 600: #003977, 700: #003064, 800: #002750, 900: #001c3a, "A100": #006fe6, "A200": #0059b8, "A400": #003c7d, "A700": #001d3c) isn't a valid CSS value.     
    ╷
216 │             --#{$prefix}-#{$key}: #{$value};
    │                                     ^^^^^^

Expected result

The build completes without errors

Attachments

sample-igniteui-angular-8.zip
build.log

@lalo-mx lalo-mx added the 🐛 bug Any issue that describes a bug label Jun 21, 2019
@simeonoff
Copy link
Collaborator

@lalo-mx I will investigate. In the meantime, you can try installing node-sass as a dependency. Let me know if it fixes the issue for you.

@simeonoff simeonoff added the ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. label Jun 24, 2019
@simeonoff
Copy link
Collaborator

@lalo-mx To get css variables produced from a palette, there is another mixin called igx-palette-vars. igx-css-vars should only be used with maps produced from a *-theme function.

Btw, I have updated your example with some inline comments to show how you can use both mixins:
sample-igniteui-angular-8-enhanced.zip

@lalo-mx
Copy link
Author

lalo-mx commented Jun 25, 2019

@simeonoff Both solutions worked. I could not find why igx-css-vars was used in that way but i am confident that was from a sample. Was the signature of the method changed recently?

@simeonoff
Copy link
Collaborator

@lalo-mx No, not for the igx-css-vars mixin. I have changed the igx-palette-vars mixin with the pull request. It should get reflected in the documentation soon. What was that sample built with?

@lalo-mx
Copy link
Author

lalo-mx commented Jun 25, 2019

@simeonoff It was with igniteui-angular 7.3.3 and Angular 7.2.15. It is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug material-theme version: 8.0.0 ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants