1

I'm setting up new project. I need help with sass implementation in Angular4. I have no idea why I keep getting this error.

.html .sass enter image description here

console error enter image description here

I have sass installed on my computer, and default styleExt was set to sass when creating project through cmd

I can't find any explanaion on the internet neither on stack overflow.

Thanks

2 Answers 2

1

I don't think that is a valid Sass syntax (the use of braces {}). Did you intend to use Scss instead? (both are usually pronounced the same way). The above syntax is valid for Scss.

You can either change the default styleExt to scss (and rename your styles related files to end in .scss or remove the braces {} from the styles file shown.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I found a solution to this problem in the same time when you posted your answer actuallly. This was quite confusing to me that sass has two different types of syntax. I hope your answer will help other people in the future
1

The error is pretty self-explanatory, Invalid CSS after .navigation

This is a valid sass:

.navigation
   border-color: red

What you're trying to do is SCSS. Change your styleExt to scss on .angular-cli.json

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.