Sass mixin argumentsThe mixin arguments are SassScript values that are passed when mixin is included and are available as variable. The argument is a name of a variable separated by a comma while defining a mixin. There are two types of mixin arguments in Sass.
Keyword ArgumentsThe keyword arguments are used to include in mixins. It specifies that the named arguments can be passed in any order and the default value of arguments can be omitted. SCSS Syntax: After the compilation, you will get the following CSS code. CSS : Variable ArgumentThe variable arguments are used to pass any number of arguments to mixin. It is used when you would be dealing with an unknown number of arguments. It contains keyword arguments passed to the function or mixin. The passed keyword arguments can be accessed using keywords($args) function which return values mapped to String. SCSS Syntax: After the compilation, you will get the following CSS code. CSS: Next TopicPassing Content Block |