Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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