Created
March 30, 2014 14:08
-
-
Save stackpoet/9873263 to your computer and use it in GitHub Desktop.
SASS MIXIN FOR HEADINGS
This file contains hidden or 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
@mixin headings($from: 1, $to: 6){ | |
@for $i from $from through $to{ | |
h#{$i}{ | |
@content | |
} | |
} | |
} | |
------USAGE----------- | |
@include headings(){ | |
font-family:sans-serif; | |
} | |
div{ | |
@include headings(){ | |
color:red; | |
} | |
} | |
.sweet{ | |
@include headings(1,3){ | |
color:red; | |
} | |
// headings(4,6) or just headings(4) | |
@include headings(4){ | |
color:blue; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment