Sass variables are simple: you assign a value to a name that begins with $ , and then you can refer to that name instead of the value itself. But despite their simplicity, they're one of the most useful tools Sass brings to the table.
In this article, we’ll take a deeper look at variables and variable scope in Sass. The ... Sass supports two types of variables: local variables and global ...
Understanding Variable Scope in Sass
The!default and!global flags are used to set variable precedence and scope in Sass. The!default flag is useful when creating plug-in type code and mixins, while the!global flag is deprecated and can be used to explicitly assign to global variables. It is important to remember that variables with null values will be considered unassigned and will be assigned with!default.
!default and !global | Sass in the Real World: book 1 of 4