Reputation: 1673
I am trying to write a simple css syntax within component's sass files in angular 7, but i am facing a compilation error as shown below.
sass file only contain simple css as shown
.full-width {
width: 100%;
}
In earlier angular versions, I didn't have such issue.
Upvotes: 0
Views: 974
Reputation: 33972
Is this SASS or SCSS ?
if this is SASS, then the brackets are invalid. just remove them for valid SASS.
.full-width
width: 100%;
if you want to keep the brackets, then you want to use the SCSS language instead.
Check the guide here to see the differences between the two: https://sass-lang.com/guide
Upvotes: 2
Reputation: 26720
According to the file extension of your SCSS file, you're actually using SASS, an older version of SCSS. As indicated in the docs for the Sass syntax, the SASS language uses indented syntax.
From the section on SASS:
The indented syntax supports all the same features as SCSS, but it uses indentation instead of curly braces and semicolons to describe the format of the document.
What you should do would be to either change the file extension of that SCSS file to .scss
, or convert the SCSS syntax to SASS.
Upvotes: 3