Skip to content

Instantly share code, notes, and snippets.

@barseghyanartur
Created March 25, 2015 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barseghyanartur/7c99893fb44d1c9f6606 to your computer and use it in GitHub Desktop.
Save barseghyanartur/7c99893fb44d1c9f6606 to your computer and use it in GitHub Desktop.
Tiny SASS mixins tutorial
/* Inheritance */
@mixin background-blue($color: blue) {
background-color: $color!important;
}
@mixin super-background($height: '300px', $color: white) {
height: $height;
@include background-blue($color);
}
body {
&.red {
@include background-blue(red);
}
&.blue {
@include background-blue;
}
&.yellow {
@include super-background($color: yellow);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment