Skip to content

Instantly share code, notes, and snippets.

@micahgodbolt
Last active July 4, 2018 17:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save micahgodbolt/5339017 to your computer and use it in GitHub Desktop.
Save micahgodbolt/5339017 to your computer and use it in GitHub Desktop.
mixin used to call font icons
%icon-font:before {
font-family: "fontcustom";
font-weight: normal;
font-style: normal;
text-decoration: inherit;
display: inline-block;
}
.icon-calendar:before { content: "\f100"; }
.icon-comment:before { content: "\f101"; }
.icon-like:before { content: "\f102"; }
.icon-location:before { content: "\f103"; }
.icon-print:before { content: "\f104"; }
.icon-search:before { content: "\f105"; }
@mixin icon-font($font-name) {
@extend .icon-#{$font-name};
@extend %icon-font;
&:before {
@content;
}
}
//to call the search icon
@include icon-font(search) {
padding-right: .5em;
text-shadow: 1px 1px 2px (#000);
}
@illepic
Copy link

illepic commented May 27, 2013

This is including "font-icon" but the mixin is called "icon-font".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment