Skip to content

Instantly share code, notes, and snippets.

@JossWhittle
Created July 26, 2012 10:21
Show Gist options
  • Save JossWhittle/3181375 to your computer and use it in GitHub Desktop.
Save JossWhittle/3181375 to your computer and use it in GitHub Desktop.
A sample of using fontello in a .LESS project
@charset "UTF-8";
@font-face {
font-family: 'groovy';
src: url('/ext/font/groovy.eot');
src: url('/ext/font/groovy.eot?#iefix') format('embedded-opentype'),
url('/ext/font/groovy.woff') format('woff'),
url('/ext/font/groovy.ttf') format('truetype'),
url('/ext/font/groovy.svg#groovy') format('svg');
font-weight: normal; font-style: normal;
}
.groovy() {
font-family: groovy;
font-style: normal;
speak: none;
display: inline-block;
width: 1.1em;
margin-right: .1em;
text-align: center;
}
.begroovy(@content, @size) {
.groovy();
font-size: @size;
content: @content;
}
.begroovy(@content) {
.groovy();
content: @content;
}
[class^="icon-"], [class*=" icon-"] {
.groovy();
}
// RSS
.icon-rss:before { content: '\e73a'; } /* '' */
.icon-rss-alt:before { content: '\e73b'; } /* '' */
// Admin
.icon-doc:before { content: '\1f4c4'; } /* '\1f4c4' */
.icon-pencil:before { content: '\270e'; } /* '✎' */
.icon-trash:before { content: '\e729'; } /* '' */
.icon-cog:before { content: '\2699'; } /* '⚙' */
.icon-thumbs-up:before { content: '\1f44d'; } /* '\1f44d' */
// Admin Post Buttons
.icon-comment:before { content: '\e718'; } /* '' */
.icon-font:before { content: '\e779'; } /* '' */
.icon-bold:before { content: '\e77a'; } /* '' */
.icon-italic:before { content: '\e77b'; } /* '' */
.icon-indent-left:before { content: '\e783'; } /* '' */
.icon-github:before { content: '\f308'; } /* '' */
.icon-video:before { content: '\1f3ac'; } /* '\1f3ac' */
.icon-camera:before { content: '\1f4f7'; } /* '\1f4f7' */
.icon-attach:before { content: '\1f4ce'; } /* '\1f4ce' */
.icon-link:before { content: '\1f517'; } /* '\1f517' */
// Conformation
.icon-ok:before { content: '\2713'; } /* '✓' */
.icon-cancel:before { content: '\2715'; } /* '✕' */
// Contact
.icon-facebook-rect:before { content: '\f301'; } /* '' */
.icon-twitter-bird:before { content: '\f303'; } /* '' */
.icon-mail:before { content: '\2709'; } /* '✉' */
// Menu
.icon-left-open:before { content: '\e75d'; } /* '' */
.icon-right-open:before { content: '\e75e'; } /* '' */
// Misc
.icon-tags:before { content: '\e70d'; } /* '' */
.icon-calendar:before { content: '\1f4c5'; } /* '\1f4c5' */
.icon-globe:before { content: '\1d30d'; } /* '\1d30d' */
.icon-pin:before { content: '\1f4cc'; } /* '\1f4cc' */
.icon-search:before { content: '\1f50d'; } /* '\1f50d' */
h1 {
font-size: 24px;
}
h1:before {
.begroovy('\2699', 20px);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment