First picture: left: index.sass compilation result (error); Right: success.sass Compile Results (Successful)
The second picture is the compiled css file
After a test, adding a space before $ will not cause an error. . .
If you use font-size:$size directly, it seems that the compiler will think that font-size is a selector and that the colon is followed by a pseudo class (similar to: a: how), so you need to add a space to indicate that this is not a pseudo class selector.