Last active
July 4, 2018 17:03
-
-
Save micahgodbolt/5339017 to your computer and use it in GitHub Desktop.
mixin used to call font icons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is including "font-icon" but the mixin is called "icon-font".