Sass (stylesheet Language) - Mixins

Mixins

CSS does not support mixins. Any repeated code must be repeated in each location. A mixin is a section of code that contains any valid Sass code. Whenever a mixin is called, the result of translating the mixin is inserted at the calling location. Mixins allow for efficient and clean code repetitions, as well as easy alteration of code.

@mixin table-base { th { text-align: center; font-weight: bold; } td, th {padding: 2px} } #data { @include table-base; }

Would compile to:

#data th { text-align: center; font-weight: bold; } #data td, #data th { padding: 2px; }

Read more about this topic:  Sass (stylesheet Language)