Less Mixins as Functions

Mixins are very similar to functions. Mixins can be nested; can accept parameters and returns values.

A list of mixins used as functions:

Index

Mixins

Explanation

1)

Mixin Scope

Mixins contains variables. Mixins are visible and mixins can be used in caller's scope.

2)

Mixin and Return Values

Mixins are similar to functions and the variables that are defined in a mixin will behave as its return values.

3)

Mixin inside another Mixin

Mixins defined inside another mixin, can be used as return value too.