Reputation: 51
I am using Sass for a project and I ran into an issue with variables. I'm specifically using the ".sass" format and not ".scss"
The error says: Invalid variable: "$weightBold = 700"
I can use variables for colors like this "$darkGrey: #333333" without errors, but I do get an error when I try to use a number for font-weight "$weightBold = 700" or width "$mediumWidth = 300px"
Upvotes: 1
Views: 632
Reputation: 43594
You need to use :
instead of =
to assign a value to the variables:
$weightBold: 700;
$darkGrey: #333333;
$mediumWidth: 300px;
You can see some examples on the official documentation:
The most straightforward way to use SassScript is to use variables. Variables begin with dollar signs, and are set like CSS properties.
$width: 5em;
Upvotes: 1