Skip to content

Instantly share code, notes, and snippets.

@BuddyLReno
Created March 4, 2015 13:54
Show Gist options
  • Save BuddyLReno/be46eabf6f9b82506f0f to your computer and use it in GitHub Desktop.
Save BuddyLReno/be46eabf6f9b82506f0f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
//Generator
@mixin theme-generator(
$post__title: "",
$post__subtitle: ""
) {
//Use defaults to filter placeholders
@if $post__title != "" {
%theme--post__title {
color: $post__title;
}
}
@if $post__subtitle != "" {
%theme--post__subtitle {
color: $post__subtitle;
}
}
}
.post__title {
@extend %theme--post__title !optional;
color: black;
}
.post__subtitle {
@extend %theme--post__subtitle !optional;
color: black;
}
.theme--forest {
@include theme-generator(
$post__title: forestgreen,
$post__subtitle: green
);
}
.theme--ocean {
@include theme-generator(
$post__subtitle: navy
);
}
.post__title {
color: black;
}
.post__subtitle {
color: black;
}
.theme--forest .post__title {
color: forestgreen;
}
.theme--forest .post__subtitle {
color: green;
}
.theme--ocean .post__subtitle {
color: navy;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment