A Practical Tip For Using Sass Default Parameters

Sass functions and mixins accept parameters, and default parameters are those that already hold a value when the function or mixin is called without them.

The trick to skipping a parameter while still supplying the ones after it is to pass named parameters. To send in $b and $c but let $a fall back to its default, name the arguments on the call.

Passing empty strings or null as the first parameter to "skip" it does not work — the named parameter approach is the way to do it.

For example, a scrollbar mixin can output what is needed for very basic styled scrollbars, and then be called with the named parameter syntax.