this is the full code of the SASS file ive written, it is properly linked to a corresponding HTML file. despite this live SASS compiler will repeatedly kick up an error message also shown:
.title {
display: flex;
justify-content: center;
background-color: black;
color: white;
margin: 0 0 0 0;
}
.main {
display: flex;
justify-content: space-evenly;
.text {
overflow-wrap: normal;
}
overflow-wrap: normal;
}
Personal information has been ofcource removed
Change detected - 3/24/2024, 4:34:29 PM
index.sass
--------------------
Compilation Error
Error: Expected newline.
╷
1 │ .title {
│ ^
╵
c:\Users\[Name]\Desktop\[other name]\index.sass 1:8 root stylesheet
I do not understand the issue particularly when comparing to my older work which does not trigger the same error.
i cant see what to do to fix this, especially given my older code is writen in seemingly the same way.
I use visual studio with the live SASS compiler installed.
For those coming to this later.
SASS had two syntaxes: indented and SCSS
Indented had a .sass
file type/suffix and is written as
.title
font-size: 2rem
SCSS syntax is similar to CSS, in that it uses braces and has a .scss
file type/suffix. This is written as
.title {
font-size: 2rem
}
In the indented syntax, tab spacing is critically important. But, in SCSS syntax, they aren't and it's the braces that are
It is important you choose the right file extension for the type of content you're writing.