Skip to content

Instantly share code, notes, and snippets.

@dpritchett
Last active August 29, 2015 13:56
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 dpritchett/8847322 to your computer and use it in GitHub Desktop.
Save dpritchett/8847322 to your computer and use it in GitHub Desktop.
Composable CSS using Sass @extend
@import 'bootstrap';
@import 'font-awesome';
.button {
@extend .btn;
@extend .btn-default;
@extend .btn-large;
&.destroy {
@extend .fa;
@extend .fa-trash-o; /* trashcan icon */
}
}
<!-- Two identical links: -->
<a href="#" class="btn btn-default btn-large fa fa-trash-o">Destroy</a>
<a href="#" class="button destroy">Destroy</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment