Last active
December 27, 2015 04:29
-
-
Save harrypujols/7267194 to your computer and use it in GitHub Desktop.
An icon font in Compass font-face syntax
This file contains 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
// this syntax needs Compass | |
@include font-face("foo", font-files("foo.woff", "foo.ttf", "foo.svg#foo"), "foo.eot", normal, normal); | |
[class^="foo-"], [class*="foo-"] { | |
font-family: 'foo'; | |
speak: none; | |
font-style: normal; | |
font-weight: normal; | |
font-variant: normal; | |
text-transform: none; | |
line-height: 1; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
// over here you should put the icon glyphs | |
// below is an example | |
.foo-bar:before { | |
content: "\e600"; | |
} | |
/* takes the underline when the icon is a link */ | |
a [class*="foo-"]:before { | |
display: inline-block; | |
text-decoration: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment