Skip to content

Instantly share code, notes, and snippets.

@harrypujols
Last active December 27, 2015 04:29
Show Gist options
  • Save harrypujols/7267194 to your computer and use it in GitHub Desktop.
Save harrypujols/7267194 to your computer and use it in GitHub Desktop.
An icon font in Compass font-face syntax
// 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