using mixins in scss code example

Example 1: sass mixin

@mixin transform($property) {
  -webkit-transform: $property;
  -ms-transform: $property;
  transform: $property;
}
.box { @include transform(rotate(30deg)); }

Example 2: variables scss

// SCSS variables

$darkcolor: #605C4D;
$large: 350px;

section{
	background-color: $darkcolor;
  	height: $large;
}

Example 3: scss @mixin base

@mixin rtl($property, $ltr-value, $rtl-value) {
  #{$property}: $ltr-value;

  [dir=rtl] & {
    #{$property}: $rtl-value;
  }
}

.sidebar {
  @include rtl(float, left, right);
}

Tags:

Misc Example