Sass functions are perhaps the most useful aspect of the language.
In addition to the functions that Sass provides natively, you can also write your own functions in Ruby. But since this is a Sass course, not a Ruby course, we won't be talking about that here.
You can use standard CSS function syntax to call Sass functions. For example the
color: rgb(42, 154, 179);
which output will be as follow:
Sass also lets you specify the arguments to the function by their name, also in any order:
color: rgb($red: 42, $blue: 154, $green: 179);
Note that the argument names are prefixed with the dollar sign (the same syntax used to identify variables)
color: rgb($red: 42, $green: 179, $blue: 154);
color: rgb($red: $red, $green: 179, $blue: 154);
and the output will be:
Sass include various function for string, numeric, list, map, selector and introspection. We will see all these functions in the next chapters.
|Calls a Sass or CSS function, passing any remaining arguments to the function|
|Returns a random unique CSS identifier|