Created
March 25, 2015 08:34
-
-
Save barseghyanartur/7c99893fb44d1c9f6606 to your computer and use it in GitHub Desktop.
Tiny SASS mixins tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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