Reputation: 107
I'm learning Sass (and JavaScript as well). I'm a bit confused on the variables used in arguments when writing a mixin. In the code below, after the mixin name we have the arguments, which I understand are variables ($image, $direction). What I'm confused about is - I believe (for example) $image and $direction are not random names/values - are these what they call SassExpressions? And is there a library or list of these somewhere? Does $direction refer to flex-direction? And $image refers to background image? Are these just CSS properties but with a shorthand? Sorry for the very newb question.
@mixin replace-text($image, $direction)
Upvotes: 0
Views: 25
Reputation: 83
Those are SASS variables. You can define any variables basically almost anywhere in SASS file, example:
$base-color: #c6538c;
$border-dark: rgba($base-color, 0.88);
.alert {
border: 1px solid $border-dark;
}
Example comes from official SASS documentation regarding variables: https://sass-lang.com/documentation/variables
Upvotes: 1