Answer the question
In order to leave comments, you need to log in
Sass syntax issue. What is the problem?
Hello. Started learning the Sass preprocessor. Installed Sass(3.4.21v). When you try to set a variable, everything is a bunch. But when in practice I start to apply a variable as a style, an error appears (I tried to remove the brackets).
$color: blue
h1 {
color: $color
}
"Error: Invalid CSS after \"h1 \": expected selector or at-rule, was \"{\"\A on line 10 of C:/Users/Worddoc/Desktop/htmlandcss/sass/screen.scss\A \A 5: \A 6: @import \"compass/reset\";\A 7: \A 8: $color: blue\A 9: \A 10: h1 {\A 11: color: $color\A 12: }"; }
Answer the question
In order to leave comments, you need to log in
You have scss syntax!
www.internet-technologies.ru/articles/article_1950.html
and in general both should work with the sass module
but with your syntax the file extension should be .scss
and I would write like this:
$color: blue;
h1 {
color: $color;
}
Read about syntax. It seems like this:
$color: blue
h1
color: $color
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question