Tuesday, November 16, 2021

Angular: SassError: Expected newline

>PROBLEM

You have a Angular project using SaSS.

Starting the server, returns the following message:

  SassError: Expected newline


>SOLUTION

Correct the .sass files converting to Sass syntax.

- syntax:
https://sass-lang.com/documentation/syntax

- Example:


>before


label {
  display: block;
  margin-top: 10px;
}

.card-container.card {
  max-width: 400px !important;
  padding: 40px 40px;
}

.card {
  background-color: #f7f7f7;
  padding: 20px 25px 30px;
  margin: 0 auto 25px;
  margin-top: 50px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  -moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}

.profile-img-card {
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  display: block;
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
}


>after


label
  display: block
  margin-top: 10px


.card-container.card
  max-width: 400px !important
  padding: 40px 40px


.card
  background-color: #f7f7f7
  padding: 20px 25px 30px
  margin: 0 auto 25px
  margin-top: 50px
  -moz-border-radius: 2px
  -webkit-border-radius: 2px
  border-radius: 2px
  -moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3)
  -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3)
  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3)


.profile-img-card
  width: 96px
  height: 96px
  margin: 0 auto 10px
  display: block
  -moz-border-radius: 50%
  -webkit-border-radius: 50%
  border-radius: 50%


>ENV

w10
node16
Angular13

No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...