Skip to content

Instantly share code, notes, and snippets.

@markgoodyear
Created November 24, 2015 10:54
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 markgoodyear/190b0f4a6b5b4d900a91 to your computer and use it in GitHub Desktop.
Save markgoodyear/190b0f4a6b5b4d900a91 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@mixin headings($from: 1, $to: 6) {
%headings-#{$from}-#{$to} {
@content
}
@if $from >= 1 and $to <= 6 {
@for $i from $from through $to {
h#{$i} {
@extend %headings-#{$from}-#{$to};
}
}
}
}
@include headings(1, 6) {
color: red;
font-weight: 300;
}
.something-else {
@include headings(1, 6) {
color: blue;
}
}
.another-else {
@include headings(1, 6) {
color: green;
}
}
.lol {
@include headings(1, 6) {
color: pink;
font-weight: 600;
}
}
h1, h2, h3, h4, h5, h6, .something-else h1, .something-else h2, .something-else h3, .something-else h4, .something-else h5, .something-else h6, .another-else h1, .another-else h2, .another-else h3, .another-else h4, .another-else h5, .another-else h6, .lol h1, .lol h2, .lol h3, .lol h4, .lol h5, .lol h6 {
color: red;
font-weight: 300;
}
.something-else h1, .something-else h2, .something-else h3, .something-else h4, .something-else h5, .something-else h6 {
color: blue;
}
.another-else h1, .another-else h2, .another-else h3, .another-else h4, .another-else h5, .another-else h6 {
color: green;
}
.lol h1, .lol h2, .lol h3, .lol h4, .lol h5, .lol h6 {
color: pink;
font-weight: 600;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment