7.5 Mixins and functions

7.5.1 Mixins

  • Acts as template of reusable properties
  • Returns CSS
  • Starts definition with @mixin
  • Use with @include directive

See example from the book.

7.5.2 Functions

  • Perform calculations–with mathematical operations, which is not possible in CSS
  • Returns values to be used used in CSS rules
  • Define with @function directive
  • Use with function name (and, if applicable, arguments) inside CSS rule

See example from the book.