Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.