Skip to content

Instantly share code, notes, and snippets.

@dawidw
Last active December 21, 2015 17:39
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 dawidw/6341783 to your computer and use it in GitHub Desktop.
Save dawidw/6341783 to your computer and use it in GitHub Desktop.
@mixin fight-with($monster) {
@if $monster == mechagodzilla {
.post__title{ &:after { @content } }
}
@else if $monster == spacegodzilla {
@content;
}
}
.post--mechagodzilla {
@include fight-with(mechagodzilla) { content: 'fight with lightning' }
}
.post--spacegodzilla {
@include fight-with(spacegodzilla) { content: 'fight with Armageddon'; .post_title:after{ content: ":)"} }
}
.post--mechagodzilla .post__title:after {
content: "fight with lightning";
}
.post--spacegodzilla {
content: 'fight with Armageddon';
}
.post--spacegodzilla .post_title:after {
content: ":)";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment