Skip to content

Instantly share code, notes, and snippets.

@flexbox
Created May 18, 2013 22:46
Show Gist options
  • Save flexbox/5605998 to your computer and use it in GitHub Desktop.
Save flexbox/5605998 to your computer and use it in GitHub Desktop.
typography-heading-mixin
@mixin headings($from: 1, $to: 6){
@if $from >= 1 and $to <= 6{
$heading-selector: (unquote(""));
@for $i from $from through $to {
$heading-selector: $heading-selector, unquote("h#{$i}")
}
#{$heading-selector}{
@content
}
}
}
@include headings(){
font-family:sans-serif;
}
div{
@include headings(1, 3){
color:#BADA55;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment